TINKERPOP-3247 Convert request bindings to gremlin-lang string format#3402
Merged
Conversation
316e283 to
8bed359
Compare
Cole-Greer
reviewed
May 4, 2026
Cole-Greer
reviewed
May 6, 2026
Contributor
|
VOTE +1 pending resolution of existing comments |
The visitor treated all keyword map keys as their text representation, so a null key in [null:"value"] was parsed as the String "null" instead of Java null. This broke round-tripping maps with null keys through GremlinLang serialization and ANTLR parsing.
Contributor
Author
|
VOTE +1 |
Contributor
|
VOTE +1 |
Moving parameters from binary-serialized maps to string representations makes the request side pure text, decoupling Gremlin language evolution from GraphBinary versioning. New types can be introduced in minor/patch versions without touching GraphBinary, eliminating the need for a major version bump across the ecosystem for every new request-side type. The asParameter() fallback is replaced with an unsupportedType flag that records the class name and falls back to toString(). A flag is used rather than throwing because embedded Traversals build GremlinLang as a side effect but never send it, so unknown types must not break execution. All other GLVs throw immediately since they have no embedded mode and the early throw gives better errors. Client APIs accept both map and string bindings (but not both at the same time) because users who use the Client directly with raw Gremlin strings shouldn't need to hand-craft gremlin-lang map literals. Mixing both throws immediately to prevent silent loss where one set of bindings would be discarded. Edge and VertexProperty tests that relied on the old asParameter fallback were removed because they aren't supported in gremlin-lang. Assisted-by: Kiro:claude-opus-4-6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/TINKERPOP-3247
Moving parameters from binary-serialized maps to string representations
makes the request side pure text, decoupling Gremlin language evolution
from GraphBinary versioning. New types can be introduced in minor/patch
versions without touching GraphBinary, eliminating the need for a major
version bump across the ecosystem for every new request-side type.
The asParameter() fallback is replaced with an unsupportedType flag that
records the class name and falls back to toString(). A flag is used
rather than throwing because embedded Traversals build GremlinLang as a
side effect but never send it, so unknown types must not break
execution. All other GLVs throw immediately since they have no embedded
mode and the early throw gives better errors.
Client APIs accept both map and string bindings (but not both at the
same time) because users who use the Client directly with raw Gremlin
strings shouldn't need to hand-craft gremlin-lang map literals. Mixing
both throws immediately to prevent silent loss where one set of bindings
would be discarded.
Edge and VertexProperty tests that relied on the old asParameter
fallback were removed because they aren't supported in gremlin-lang.