Skip to content

Commit

Permalink
Fix compilation problems from concurrent merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Mar 21, 2018
1 parent b0c1a23 commit e83751f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Expand Up @@ -25,14 +25,11 @@

import org.neo4j.collection.primitive.Primitive;
import org.neo4j.collection.primitive.PrimitiveLongSet;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node;
import org.neo4j.values.storable.Values;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.neo4j.graphdb.Label.label;

public abstract class NodeIndexTransactionStateTestBase<G extends KernelAPIWriteTestSupport>
extends KernelAPIWriteTestBase<G>
Expand All @@ -59,7 +56,7 @@ public void shouldPerformStringSuffixSearch() throws Exception
expected.add( nodeWithProp( tx, "2suff" ) );
nodeWithProp( tx, "skruff" );
CapableIndexReference index = tx.schemaRead().index( label, prop );
try ( NodeValueIndexCursor nodes = cursors.allocateNodeValueIndexCursor() )
try ( NodeValueIndexCursor nodes = tx.cursors().allocateNodeValueIndexCursor() )
{
tx.dataRead().nodeIndexSeek( index, nodes, IndexOrder.NONE, IndexQuery.stringSuffix( prop, "suff" ) );
PrimitiveLongSet found = Primitive.longSet();
Expand Down Expand Up @@ -95,7 +92,7 @@ public void shouldPerformStringContainsSearch() throws Exception
expected.add( nodeWithProp( tx, "homeopatic" ) );
nodeWithProp( tx, "telephonecompany" );
CapableIndexReference index = tx.schemaRead().index( label, prop );
try ( NodeValueIndexCursor nodes = cursors.allocateNodeValueIndexCursor() )
try ( NodeValueIndexCursor nodes = tx.cursors().allocateNodeValueIndexCursor() )
{
tx.dataRead().nodeIndexSeek( index, nodes, IndexOrder.NONE, IndexQuery.stringContains( prop, "me" ) );
PrimitiveLongSet found = Primitive.longSet();
Expand Down
Expand Up @@ -58,6 +58,7 @@
import org.neo4j.internal.kernel.api.CapableIndexReference;
import org.neo4j.internal.kernel.api.IndexOrder;
import org.neo4j.internal.kernel.api.IndexQuery;
import org.neo4j.internal.kernel.api.IndexReference;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.NodeIndexCursor;
import org.neo4j.internal.kernel.api.NodeLabelIndexCursor;
Expand Down Expand Up @@ -738,7 +739,7 @@ private ResourceIterator<Node> nodesByLabelAndProperties(
}

int[] propertyIds = getPropertyIds( queries );
CapableIndexReference index = findMatchingIndex( transaction, labelId, propertyIds );
IndexReference index = findMatchingIndex( transaction, labelId, propertyIds );

if ( index != CapableIndexReference.NO_INDEX )
{
Expand All @@ -756,9 +757,9 @@ private ResourceIterator<Node> nodesByLabelAndProperties(
return getNodesByLabelAndPropertyWithoutIndex( statement, labelId, queries );
}

private CapableIndexReference findMatchingIndex( KernelTransaction transaction, int labelId, int[] propertyIds )
private IndexReference findMatchingIndex( KernelTransaction transaction, int labelId, int[] propertyIds )
{
CapableIndexReference index = transaction.schemaRead().index( labelId, propertyIds );
IndexReference index = transaction.schemaRead().index( labelId, propertyIds );
if ( index != CapableIndexReference.NO_INDEX )
{
// index found with property order matching the query
Expand All @@ -772,7 +773,7 @@ private CapableIndexReference findMatchingIndex( KernelTransaction transaction,

int[] workingCopy = new int[propertyIds.length];

Iterator<CapableIndexReference> indexes = transaction.schemaRead().indexesGetForLabel( labelId );
Iterator<IndexReference> indexes = transaction.schemaRead().indexesGetForLabel( labelId );
while ( indexes.hasNext() )
{
index = indexes.next();
Expand Down

0 comments on commit e83751f

Please sign in to comment.