Skip to content

Commit

Permalink
TINKERPOP-2959 valueMap will not take variable for boolean arg CTR
Browse files Browse the repository at this point in the history
  • Loading branch information
spmallette committed Nov 19, 2024
1 parent 8712feb commit 038ba3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Added support for deserialization of `Set` for `gremlin-javascript`.
* Added grammar-based `Translator` for all languages including explicit ones for Java and anonymization.
* Removed grammar support for enums to be used as variables.
* Changed `valueMap` in grammar to disallow the `boolean` argument as a variable to avoid ambiguous step calls.
* Added integer overflow checks for `sum()`.
* Gremlin Server only supports instantiation of `authentication.authenticationHandler` with three-arg constructor.
* Removed previously deprecated two-arg constructors for `authentication.authenticationHandler` implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1698,9 +1698,9 @@ public GraphTraversal visitTraversalMethod_valueMap_String(final GremlinParser.T
@Override
public GraphTraversal visitTraversalMethod_valueMap_boolean_String(final GremlinParser.TraversalMethod_valueMap_boolean_StringContext ctx) {
if (ctx.getChildCount() == 4) {
return graphTraversal.valueMap((boolean) antlr.argumentVisitor.visitBooleanArgument(ctx.booleanArgument()));
return graphTraversal.valueMap(antlr.genericVisitor.parseBoolean(ctx.booleanLiteral()));
} else {
return graphTraversal.valueMap((boolean) antlr.argumentVisitor.visitBooleanArgument(ctx.booleanArgument()),
return graphTraversal.valueMap(antlr.genericVisitor.parseBoolean(ctx.booleanLiteral()),
antlr.genericVisitor.parseStringVarargs(ctx.stringLiteralVarargs()));
}
}
Expand Down
2 changes: 1 addition & 1 deletion gremlin-language/src/main/antlr4/Gremlin.g4
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ traversalMethod_value

traversalMethod_valueMap
: 'valueMap' LPAREN stringLiteralVarargs RPAREN #traversalMethod_valueMap_String
| 'valueMap' LPAREN booleanArgument (COMMA stringLiteralVarargs)? RPAREN #traversalMethod_valueMap_boolean_String
| 'valueMap' LPAREN booleanLiteral (COMMA stringLiteralVarargs)? RPAREN #traversalMethod_valueMap_boolean_String
;

traversalMethod_values
Expand Down

0 comments on commit 038ba3b

Please sign in to comment.