diff --git a/compatibility/4.4/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_44/Neo4jProxyImpl.java b/compatibility/4.4/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_44/Neo4jProxyImpl.java index 03f6e20875..67b510f392 100644 --- a/compatibility/4.4/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_44/Neo4jProxyImpl.java +++ b/compatibility/4.4/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_44/Neo4jProxyImpl.java @@ -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; @@ -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; @@ -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; @@ -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; @@ -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); @@ -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 cursors, int[] labelIds) { return new CompositeNodeCursorImpl(cursors, labelIds); diff --git a/compatibility/5-common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java b/compatibility/5-common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java index dabd74b8b0..a75df11637 100644 --- a/compatibility/5-common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java +++ b/compatibility/5-common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java @@ -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; @@ -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"); @@ -199,34 +193,6 @@ protected List> 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 cursors, diff --git a/compatibility/5-common/neo4j-kernel-adapter/src/main/java17/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java b/compatibility/5-common/neo4j-kernel-adapter/src/main/java17/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java index f9598c0da1..8d4828accc 100644 --- a/compatibility/5-common/neo4j-kernel-adapter/src/main/java17/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java +++ b/compatibility/5-common/neo4j-kernel-adapter/src/main/java17/org/neo4j/gds/compat/_5x/CommonNeo4jProxyImpl.java @@ -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; @@ -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; @@ -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; @@ -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; @@ -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); @@ -300,51 +284,6 @@ public StoreScan 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 cursors, int[] labelIds) { return new CompositeNodeCursorImpl(cursors, labelIds); diff --git a/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java b/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java index 84347c41a3..8b9279ca37 100644 --- a/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java +++ b/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java @@ -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; @@ -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; @@ -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; @@ -153,8 +149,6 @@ void relationshipProperties( NodeLabelIndexCursor allocateNodeLabelIndexCursor(KernelTransaction kernelTransaction); - NodeValueIndexCursor allocateNodeValueIndexCursor(KernelTransaction kernelTransaction); - boolean hasNodeLabelIndex(KernelTransaction kernelTransaction); StoreScan nodeLabelIndexScan( @@ -170,25 +164,6 @@ StoreScan 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 cursors, int[] labelIds); Configuration batchImporterConfig(