Skip to content

#3811 remove Cypher support from gremlin#3814

Merged
robfrank merged 3 commits intomainfrom
feat/3811-remove-cypher-from-gremlin
Apr 9, 2026
Merged

#3811 remove Cypher support from gremlin#3814
robfrank merged 3 commits intomainfrom
feat/3811-remove-cypher-from-gremlin

Conversation

@robfrank
Copy link
Copy Markdown
Collaborator

@robfrank robfrank commented Apr 8, 2026

What does this PR do?

remvoes cypehr bridge from gremlin module

Motivation

the new OpenCypher support is mature

Related issues

#3811

Additional Notes

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

@robfrank robfrank added this to the 26.4.1 milestone Apr 8, 2026
@robfrank robfrank linked an issue Apr 8, 2026 that may be closed by this pull request
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 8, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 100.00% diff coverage · -8.10% coverage variation

Metric Results
Coverage variation -8.10% coverage variation
Diff coverage 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (f642bb9) 116662 85638 73.41%
Head commit (1efb01a) 147303 (+30641) 96192 (+10554) 65.30% (-8.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3814) 22 22 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

TIP This summary will be updated as you push new changes. Give us feedback

@claude
Copy link
Copy Markdown

claude Bot commented Apr 8, 2026

Code Review

This PR cleanly removes the Cypher-to-Gremlin translation bridge and its ~1800 lines of supporting code. The motivation is sound - the standalone OpenCypher engine is the right path forward. A few observations:

Dead code in QueryEngineManager.java

The engine still registers the now-deleted CypherQueryEngineFactory:

// REGISTER GREMLIN AND ITS CYPHER ENGINE (OVERRIDES "cypher" WITH GREMLIN-BASED IMPLEMENTATION IF AVAILABLE)
register("com.arcadedb.cypher.query.CypherQueryEngineFactory");

Since the class no longer exists, register() will swallow the ClassNotFoundException at FINE log level - no crash, but this is dead code. The comment and the register() call on line 69 should both be removed.

Commented-out test in GremlinTest.java

The merge() test is commented out rather than migrated or deleted:

//  void merge() {
//    ...
//    graph.cypher("UNWIND range(0, 10) AS id MERGE (v:TestMerge{id: id}) RETURN v").execute();

If MERGE with UNWIND works in the OpenCypher engine today, this test should be rewritten using the OpenCypher path and moved to the OpenCypher test suite. If it does not work yet, the issue should be tracked. Leaving it commented out with no follow-up note makes it easy to forget.

Performance benchmarks are now misleading

CypherEngineComparisonBenchmark.java and QueryLanguageWithGremlinAndCypherBenchmark.java still call database.query("cypher", ...). These benchmarks were designed to compare the Gremlin-Cypher bridge against OpenCypher. With the bridge gone, both test paths now hit OpenCypher (because "cypher" aliases "opencypher" in QueryEngineManager). The comparison is no longer meaningful. These files should either be updated to benchmark something relevant or removed.

Breaking API change - worth documenting

ArcadeGraph.cypher(String) and ArcadeGraph.cypher(String, Map) are public API. Their removal is a breaking change for anyone calling the Gremlin Java API directly. This should be called out explicitly in the release notes / changelog for 26.4.1.

{cypher} prefix still works (informational, not a bug)

Worth noting: the Python e2e tests are correctly updated to {opencypher}, but {cypher} would also continue to work because QueryEngineManager maps "cypher" -> OpenCypher as a fallback. This is fine - just useful to know for communicating to users that {cypher} queries will not break immediately.

Minor: stray blank line in pom.xml

A blank line is left where the translation dependency was removed. Small cosmetic nit.


Overall the change is well-scoped and the deletions are clean. The main actionable items are: remove the dead CypherQueryEngineFactory registration from QueryEngineManager, decide what to do with the commented-out merge() test, and clean up or update the now-misleading benchmark files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 374 third-party dependencies.
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.10.4 - https://github.com/yawkat/lz4-java)
     (EPL 2.0) (GNU Lesser General Public License) Logback Classic Module (ch.qos.logback:logback-classic:1.5.32 - http://logback.qos.ch/logback-classic)
     (EPL 2.0) (GNU Lesser General Public License) Logback Core Module (ch.qos.logback:logback-core:1.5.32 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Test Utils (com.arcadedb:arcadedb-test-utils:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-test-utils/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.2 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.2 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.21.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)
     (Apache License 2.0) proto-google-common-protos (com.google.api.grpc:proto-google-common-protos:2.67.0 - https://github.com/googleapis/sdk-platform-java)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the Cypher-to-Gremlin translation bridge and related classes, replacing them with a new opencypher engine implementation. The changes include updating test cases to use the new engine syntax, removing deprecated dependencies, and cleaning up initialization logic. I have identified two areas for improvement: the comment in ArcadeGraph.java regarding Cypher initialization is now inaccurate, and the commented-out merge() test in GremlinTest.java should be either refactored or removed to avoid dead code.

Comment on lines +518 to +519
importPlugin.classImports(Math.class);
importPlugin.methodImports(List.of("java.lang.Math#*"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment // INITIALIZE CYPHER on line 516 is now misleading because the Cypher-to-Gremlin bridge has been removed from this module. This block now only initializes general Gremlin imports (such as Math). Consider updating the comment to reflect its current purpose or removing it entirely.

Comment on lines +492 to +507
// @Test
// void merge() {
// final ArcadeGraph graph = ArcadeGraph.open("./target/testgremlin");
// try {
// graph.database.command("sqlscript",//
// "CREATE VERTEX TYPE TestMerge;" + //
// "CREATE PROPERTY TestMerge.id INTEGER;" +//
// "CREATE INDEX ON TestMerge (id) UNIQUE;");
//
// graph.cypher("CREATE (v:TestMerge{id: 0})").execute();
// graph.cypher("UNWIND range(0, 10) AS id MERGE (v:TestMerge{id: id}) RETURN v").execute();
//
// } finally {
// graph.drop();
// }
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The merge() test case has been commented out. Leaving commented-out code in the repository is generally discouraged as it leads to dead code accumulation. If this test logic is still relevant for the new opencypher engine, it should be refactored to use that engine (e.g., via graph.getDatabase().command("opencypher", ...)). Otherwise, this block should be removed entirely.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 8, 2026

Title: PR Review: Remove Cypher-to-Gremlin Bridge

This is a clean, well-motivated removal of the old Cypher-to-Gremlin translation bridge (~1,800 lines deleted). The removal of the opencypher.gremlin:translation dependency also closes a security surface. Overall the change looks good. A few things worth discussing:

Breaking Change - Backward Compatibility

The removal of CypherQueryEngineFactory registration from QueryEngineManager.java means that any user calling database.query("cypher", ...) or database.command("cypher", ...) will now receive an error about an unknown engine. This is a user-visible breaking change with no migration path in this PR.

Consider registering "cypher" as an alias that routes to "opencypher" in the new engine, or at minimum throwing a descriptive error message like: "Language 'cypher' has been replaced by 'opencypher'. Please update your code." rather than a generic "unknown language" error.

Commented-Out Test

In GremlinTest.java, the merge() test is commented out rather than deleted or rewritten. If this test case is no longer valid with the new engine, delete it. If it should still work, rewrite it using database.command("opencypher", ...) and re-enable it. Commented-out code should not be committed.

GraphQLResultSet.java Fix

The added fallback to look up the property directly from the element when not found in the projection is correct and necessary for the new OpenCypher engine. However, there is no explicit regression test covering this behavior change in GraphQLCypherDirectivesTest. The removal of the getExpectedPropertiesMetadata() override (which previously returned 0) suggests metadata properties are now correctly returned - a targeted test for this would prevent future regressions.

Minor Nit

The blank line left in gremlin/pom.xml after removing the translation dependency block can be cleaned up.

Summary

  • Core removal logic: Good
  • Backward compatibility for "cypher" language key: Needs attention
  • Commented-out test code: Needs cleanup
  • New GraphQL projection fix: Good, but needs a regression test
  • Dependency removal: Good (reduces security surface)

The backward compatibility concern is the most important issue before merging - existing user code using "cypher" as the language name will silently break.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 374 third-party dependencies.
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.10.4 - https://github.com/yawkat/lz4-java)
     (EPL 2.0) (GNU Lesser General Public License) Logback Classic Module (ch.qos.logback:logback-classic:1.5.32 - http://logback.qos.ch/logback-classic)
     (EPL 2.0) (GNU Lesser General Public License) Logback Core Module (ch.qos.logback:logback-core:1.5.32 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Test Utils (com.arcadedb:arcadedb-test-utils:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-test-utils/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.2 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.2 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.21.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)
     (Apache License 2.0) proto-google-common-protos (com.google.api.grpc:proto-google-common-protos:2.67.0 - https://github.com/googleapis/sdk-platform-java)

robfrank and others added 3 commits April 9, 2026 10:37
After removing the Gremlin-based Cypher engine, the @cypher GraphQL
directive now uses the native OpenCypher engine which returns results
with the vertex set as element but properties wrapped in content map.
GraphQLResultSet now falls back to reading properties from the element
when not found in the projection content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robfrank robfrank force-pushed the feat/3811-remove-cypher-from-gremlin branch from db014aa to 1efb01a Compare April 9, 2026 08:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 374 third-party dependencies.
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.10.4 - https://github.com/yawkat/lz4-java)
     (EPL 2.0) (GNU Lesser General Public License) Logback Classic Module (ch.qos.logback:logback-classic:1.5.32 - http://logback.qos.ch/logback-classic)
     (EPL 2.0) (GNU Lesser General Public License) Logback Core Module (ch.qos.logback:logback-core:1.5.32 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Test Utils (com.arcadedb:arcadedb-test-utils:26.4.1-SNAPSHOT - https://arcadedata.com/arcadedb-test-utils/)
     (Apache License 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.2 - https://github.com/FasterXML/jackson-core)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.2 - https://github.com/FasterXML/jackson)
     (Apache License 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.21.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (Apache License 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (Apache License 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (Apache License 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache License 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)
     (Apache License 2.0) proto-google-common-protos (com.google.api.grpc:proto-google-common-protos:2.67.0 - https://github.com/googleapis/sdk-platform-java)

@claude
Copy link
Copy Markdown

claude Bot commented Apr 9, 2026

Code Review\n\nOverall, this is a well-motivated cleanup PR that removes the older Cypher-to-Gremlin translation bridge in favor of the native OpenCypher engine. The net result is 1887 deletions vs 98 additions - a significant reduction in complexity.\n\nPositive Aspects\n\n- Backward compatibility maintained: QueryEngineManager already registers 'cypher' as an alias for the OpenCypher engine (lines 62-65), so existing calls to database.command('cypher', ...) will continue to work with the native engine.\n- PostgreSQL wire protocol: PostgresNetworkExecutor already handles both 'cypher' and 'opencypher', so that path is fine.\n- Security improvement: Removes the Groovy-based translation path and the associated StringTranslationUtils injection-prevention workarounds.\n- Removes a complex, unmaintained dependency: The opencypher-gremlin translation library was a significant source of workarounds (expandAllKeysPattern, replaceParameterNames, ArcadeCustomFunctions).\n\n---\n\nIssues\n\n1. Commented-out test in GremlinTest.java (issue 1301): The merge() test was commented out rather than deleted or ported. This is a code smell. The test should either be rewritten using database.command('opencypher', ...) to verify the native engine handles the same scenario, or be deleted with a note explaining why it is no longer needed.\n\n2. Stale comment in QueryEngineManager.java: Line 67 still reads 'REGISTER GREMLIN AND ITS CYPHER ENGINE (OVERRIDES cypher WITH GREMLIN-BASED IMPLEMENTATION IF AVAILABLE)'. Since CypherQueryEngineFactory has been removed, the Gremlin module no longer overrides 'cypher'. The comment should be updated.\n\n3. GraphQLResultSet.java - why was getExpectedPropertiesMetadata() override removed? The new property fallback in mapProjections looks correct. However, getExpectedPropertiesMetadata() was removed from GraphQLCypherDirectivesTest without explanation - it previously returned 0 to accommodate the Gremlin-Cypher engine's different metadata behavior. A brief comment in the test or PR description explaining why the override is no longer needed would help future readers.\n\n4. Missing CHANGELOG / migration note: For a change of this scope - removing a query engine and a dependency - a CHANGELOG entry or migration note would be helpful. Key points: the gremlin-cypher bridge is removed (native OpenCypher is now the sole 'cypher' implementation), ArcadeGraph.cypher() API has been removed from the Gremlin module, the {cypher} prefix in the PostgreSQL wire protocol continues to work via the 'cypher' alias.\n\n---\n\nMinor: The large block of field reformatting in LocalDatabase.java (alignment style change) makes the diff harder to read. If this was triggered by Prettier/formatter, that is fine.\n\n---\n\nSummary: The core removal is correct and well-executed. The main actionable items are: (1) Delete or rewrite the commented-out merge() test in GremlinTest.java. (2) Update the stale comment on line 67 of QueryEngineManager.java. (3) Consider adding a CHANGELOG entry for the removal of ArcadeGraph.cypher().

@robfrank robfrank merged commit 9247626 into main Apr 9, 2026
23 of 25 checks passed
@robfrank robfrank deleted the feat/3811-remove-cypher-from-gremlin branch April 9, 2026 09:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.75%. Comparing base (f642bb9) to head (1efb01a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../com/arcadedb/graphql/schema/GraphQLResultSet.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3814      +/-   ##
==========================================
+ Coverage   64.56%   64.75%   +0.18%     
==========================================
  Files        1582     1577       -5     
  Lines      116662   116168     -494     
  Branches    24741    24649      -92     
==========================================
- Hits        75323    75219     -104     
+ Misses      31052    30672     -380     
+ Partials    10287    10277      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Apr 10, 2026
@ExtReMLapin
Copy link
Copy Markdown
Contributor

bye bye

@ExtReMLapin
Copy link
Copy Markdown
Contributor

I think you forgot to remove it from the frontend ! @robfrank

@robfrank
Copy link
Copy Markdown
Collaborator Author

do we have a frontend? :)

@ExtReMLapin
Copy link
Copy Markdown
Contributor

Studio sounds very much like the frontend to me

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Cypher from Gremlin module

2 participants