Skip to content

Commit

Permalink
Remove unused compat methods
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenreichardt committed Nov 3, 2023
1 parent 01b0ee3 commit 6a12f0e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
import org.neo4j.configuration.connectors.ConnectorPortRegister;
import org.neo4j.configuration.helpers.DatabaseNameValidator;
import org.neo4j.dbms.api.DatabaseManagementService;
import org.neo4j.exceptions.KernelException;
import org.neo4j.fabric.FabricDatabaseManager;
import org.neo4j.gds.annotation.SuppressForbidden;
import org.neo4j.gds.compat.BoltTransactionRunner;
import org.neo4j.gds.compat.CompatCallableProcedure;
import org.neo4j.gds.compat.CompatExecutionContext;
import org.neo4j.gds.compat.CompatExecutionMonitor;
import org.neo4j.gds.compat.CompatIndexQuery;
import org.neo4j.gds.compat.CompatInput;
import org.neo4j.gds.compat.CompatUserAggregationFunction;
import org.neo4j.gds.compat.CompositeNodeCursor;
Expand Down Expand Up @@ -74,15 +72,10 @@
import org.neo4j.internal.id.IdGenerator;
import org.neo4j.internal.id.IdGeneratorFactory;
import org.neo4j.internal.kernel.api.Cursor;
import org.neo4j.internal.kernel.api.IndexQueryConstraints;
import org.neo4j.internal.kernel.api.IndexReadSession;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.NodeLabelIndexCursor;
import org.neo4j.internal.kernel.api.NodeValueIndexCursor;
import org.neo4j.internal.kernel.api.PartitionedScan;
import org.neo4j.internal.kernel.api.PropertyCursor;
import org.neo4j.internal.kernel.api.PropertyIndexQuery;
import org.neo4j.internal.kernel.api.QueryContext;
import org.neo4j.internal.kernel.api.Read;
import org.neo4j.internal.kernel.api.RelationshipScanCursor;
import org.neo4j.internal.kernel.api.Scan;
Expand All @@ -98,7 +91,6 @@
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.internal.recordstorage.RecordIdType;
import org.neo4j.internal.schema.IndexCapability;
import org.neo4j.internal.schema.IndexOrder;
import org.neo4j.internal.schema.IndexValueCapability;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
Expand Down Expand Up @@ -133,7 +125,6 @@
import org.neo4j.storageengine.api.PropertySelection;
import org.neo4j.values.storable.TextArray;
import org.neo4j.values.storable.ValueCategory;
import org.neo4j.values.storable.ValueGroup;
import org.neo4j.values.virtual.MapValue;
import org.neo4j.values.virtual.NodeValue;
import org.neo4j.values.virtual.VirtualValues;
Expand Down Expand Up @@ -282,13 +273,6 @@ public NodeLabelIndexCursor allocateNodeLabelIndexCursor(KernelTransaction kerne
return kernelTransaction.cursors().allocateNodeLabelIndexCursor(kernelTransaction.cursorContext());
}

@Override
public NodeValueIndexCursor allocateNodeValueIndexCursor(KernelTransaction kernelTransaction) {
return kernelTransaction
.cursors()
.allocateNodeValueIndexCursor(kernelTransaction.cursorContext(), kernelTransaction.memoryTracker());
}

@Override
public boolean hasNodeLabelIndex(KernelTransaction kernelTransaction) {
return NodeLabelIndexLookupImpl.hasNodeLabelIndex(kernelTransaction);
Expand Down Expand Up @@ -347,44 +331,6 @@ public void close() {
};
}

@Override
public CompatIndexQuery rangeIndexQuery(
int propertyKeyId,
double from,
boolean fromInclusive,
double to,
boolean toInclusive
) {
return new CompatIndexQueryImpl(PropertyIndexQuery.range(propertyKeyId, from, fromInclusive, to, toInclusive));
}

@Override
public CompatIndexQuery rangeAllIndexQuery(int propertyKeyId) {
return new CompatIndexQueryImpl(PropertyIndexQuery.range(propertyKeyId, ValueGroup.NUMBER));
}

@Override
public void nodeIndexSeek(
Read dataRead,
IndexReadSession index,
NodeValueIndexCursor cursor,
IndexOrder indexOrder,
boolean needsValues,
CompatIndexQuery query
) throws KernelException {
var indexQueryConstraints = indexOrder == IndexOrder.NONE
? IndexQueryConstraints.unordered(needsValues)
: IndexQueryConstraints.constrained(indexOrder, needsValues);

dataRead.nodeIndexSeek(
(QueryContext) dataRead,
index,
cursor,
indexQueryConstraints,
((CompatIndexQueryImpl) query).indexQuery
);
}

@Override
public CompositeNodeCursor compositeNodeCursor(List<NodeLabelIndexCursor> cursors, int[] labelIds) {
return new CompositeNodeCursorImpl(cursors, labelIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.neo4j.gds.compat.BoltTransactionRunner;
import org.neo4j.gds.compat.CompatCallableProcedure;
import org.neo4j.gds.compat.CompatExecutionMonitor;
import org.neo4j.gds.compat.CompatIndexQuery;
import org.neo4j.gds.compat.CompatInput;
import org.neo4j.gds.compat.CompatUserAggregationFunction;
import org.neo4j.gds.compat.CompositeNodeCursor;
Expand Down Expand Up @@ -152,11 +151,6 @@ public org.neo4j.internal.kernel.api.NodeLabelIndexCursor allocateNodeLabelIndex
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public org.neo4j.internal.kernel.api.NodeValueIndexCursor allocateNodeValueIndexCursor(org.neo4j.kernel.api.KernelTransaction kernelTransaction) {
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public boolean hasNodeLabelIndex(org.neo4j.kernel.api.KernelTransaction kernelTransaction) {
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
Expand Down Expand Up @@ -199,34 +193,6 @@ protected List<StoreScan<org.neo4j.internal.kernel.api.NodeLabelIndexCursor>> pa
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public CompatIndexQuery rangeIndexQuery(
int propertyKeyId,
double from,
boolean fromInclusive,
double to,
boolean toInclusive
) {
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public CompatIndexQuery rangeAllIndexQuery(int propertyKeyId) {
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public void nodeIndexSeek(
org.neo4j.internal.kernel.api.Read dataRead,
org.neo4j.internal.kernel.api.IndexReadSession index,
org.neo4j.internal.kernel.api.NodeValueIndexCursor cursor,
org.neo4j.internal.schema.IndexOrder indexOrder,
boolean needsValues,
CompatIndexQuery query
) throws org.neo4j.exceptions.KernelException {
throw new IllegalStateException("Compat layer for 5.x must be run on Java 17");
}

@Override
public CompositeNodeCursor compositeNodeCursor(
List<org.neo4j.internal.kernel.api.NodeLabelIndexCursor> cursors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
import org.neo4j.configuration.connectors.ConnectorType;
import org.neo4j.configuration.helpers.DatabaseNameValidator;
import org.neo4j.dbms.api.DatabaseManagementService;
import org.neo4j.exceptions.KernelException;
import org.neo4j.fabric.FabricDatabaseManager;
import org.neo4j.gds.annotation.SuppressForbidden;
import org.neo4j.gds.compat.CompatCallableProcedure;
import org.neo4j.gds.compat.CompatExecutionMonitor;
import org.neo4j.gds.compat.CompatIndexQuery;
import org.neo4j.gds.compat.CompatInput;
import org.neo4j.gds.compat.CompatUserAggregationFunction;
import org.neo4j.gds.compat.CompositeNodeCursor;
Expand Down Expand Up @@ -71,14 +69,9 @@
import org.neo4j.internal.helpers.HostnamePort;
import org.neo4j.internal.id.IdGenerator;
import org.neo4j.internal.id.IdGeneratorFactory;
import org.neo4j.internal.kernel.api.IndexQueryConstraints;
import org.neo4j.internal.kernel.api.IndexReadSession;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.NodeLabelIndexCursor;
import org.neo4j.internal.kernel.api.NodeValueIndexCursor;
import org.neo4j.internal.kernel.api.PropertyCursor;
import org.neo4j.internal.kernel.api.PropertyIndexQuery;
import org.neo4j.internal.kernel.api.QueryContext;
import org.neo4j.internal.kernel.api.Read;
import org.neo4j.internal.kernel.api.RelationshipScanCursor;
import org.neo4j.internal.kernel.api.connectioninfo.ClientConnectionInfo;
Expand All @@ -91,7 +84,6 @@
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.internal.recordstorage.RecordIdType;
import org.neo4j.internal.schema.IndexCapability;
import org.neo4j.internal.schema.IndexOrder;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.io.layout.Neo4jLayout;
Expand Down Expand Up @@ -123,7 +115,6 @@
import org.neo4j.storageengine.api.StorageEngineFactory;
import org.neo4j.values.storable.TextArray;
import org.neo4j.values.storable.ValueCategory;
import org.neo4j.values.storable.Values;
import org.neo4j.values.virtual.MapValue;
import org.neo4j.values.virtual.NodeValue;
import org.neo4j.values.virtual.VirtualValues;
Expand Down Expand Up @@ -262,13 +253,6 @@ public NodeLabelIndexCursor allocateNodeLabelIndexCursor(KernelTransaction kerne
return kernelTransaction.cursors().allocateNodeLabelIndexCursor(kernelTransaction.cursorContext());
}

@Override
public NodeValueIndexCursor allocateNodeValueIndexCursor(KernelTransaction kernelTransaction) {
return kernelTransaction
.cursors()
.allocateNodeValueIndexCursor(kernelTransaction.cursorContext(), kernelTransaction.memoryTracker());
}

@Override
public boolean hasNodeLabelIndex(KernelTransaction kernelTransaction) {
return NodeLabelIndexLookupImpl.hasNodeLabelIndex(kernelTransaction);
Expand Down Expand Up @@ -300,51 +284,6 @@ public StoreScan<RelationshipScanCursor> relationshipsScan(
return new PartitionedStoreScan<>(ktx.dataRead().allRelationshipsScan(numberOfPartitions, ktx.cursorContext()));
}

@Override
public CompatIndexQuery rangeIndexQuery(
int propertyKeyId,
double from,
boolean fromInclusive,
double to,
boolean toInclusive
) {
return new CompatIndexQueryImpl(PropertyIndexQuery.range(propertyKeyId, from, fromInclusive, to, toInclusive));
}

@Override
public CompatIndexQuery rangeAllIndexQuery(int propertyKeyId) {
var rangePredicate = PropertyIndexQuery.range(
propertyKeyId,
Values.doubleValue(Double.NEGATIVE_INFINITY),
true,
Values.doubleValue(Double.POSITIVE_INFINITY),
true
);
return new CompatIndexQueryImpl(rangePredicate);
}

@Override
public void nodeIndexSeek(
Read dataRead,
IndexReadSession index,
NodeValueIndexCursor cursor,
IndexOrder indexOrder,
boolean needsValues,
CompatIndexQuery query
) throws KernelException {
var indexQueryConstraints = indexOrder == IndexOrder.NONE
? IndexQueryConstraints.unordered(needsValues)
: IndexQueryConstraints.constrained(indexOrder, needsValues);

dataRead.nodeIndexSeek(
(QueryContext) dataRead,
index,
cursor,
indexQueryConstraints,
((CompatIndexQueryImpl) query).indexQuery
);
}

@Override
public CompositeNodeCursor compositeNodeCursor(List<NodeLabelIndexCursor> cursors, int[] labelIds) {
return new CompositeNodeCursorImpl(cursors, labelIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.neo4j.configuration.Config;
import org.neo4j.configuration.connectors.ConnectorPortRegister;
import org.neo4j.dbms.api.DatabaseManagementService;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.annotation.SuppressForbidden;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
Expand All @@ -44,10 +43,8 @@
import org.neo4j.internal.batchimport.staging.ExecutionMonitor;
import org.neo4j.internal.helpers.HostnamePort;
import org.neo4j.internal.id.IdGeneratorFactory;
import org.neo4j.internal.kernel.api.IndexReadSession;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.NodeLabelIndexCursor;
import org.neo4j.internal.kernel.api.NodeValueIndexCursor;
import org.neo4j.internal.kernel.api.PropertyCursor;
import org.neo4j.internal.kernel.api.Read;
import org.neo4j.internal.kernel.api.RelationshipScanCursor;
Expand All @@ -61,7 +58,6 @@
import org.neo4j.internal.kernel.api.security.AuthSubject;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.internal.schema.IndexCapability;
import org.neo4j.internal.schema.IndexOrder;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.io.layout.Neo4jLayout;
Expand Down Expand Up @@ -153,8 +149,6 @@ void relationshipProperties(

NodeLabelIndexCursor allocateNodeLabelIndexCursor(KernelTransaction kernelTransaction);

NodeValueIndexCursor allocateNodeValueIndexCursor(KernelTransaction kernelTransaction);

boolean hasNodeLabelIndex(KernelTransaction kernelTransaction);

StoreScan<NodeLabelIndexCursor> nodeLabelIndexScan(
Expand All @@ -170,25 +164,6 @@ StoreScan<NodeLabelIndexCursor> nodeLabelIndexScan(

CompatExecutionContext executionContext(KernelTransaction ktx);

CompatIndexQuery rangeIndexQuery(
int propertyKeyId,
double from,
boolean fromInclusive,
double to,
boolean toInclusive
);

CompatIndexQuery rangeAllIndexQuery(int propertyKeyId);

void nodeIndexSeek(
Read dataRead,
IndexReadSession index,
NodeValueIndexCursor cursor,
IndexOrder indexOrder,
boolean needsValues,
CompatIndexQuery query
) throws KernelException;

CompositeNodeCursor compositeNodeCursor(List<NodeLabelIndexCursor> cursors, int[] labelIds);

Configuration batchImporterConfig(
Expand Down

0 comments on commit 6a12f0e

Please sign in to comment.