Description
Bytecode queries that contain an empty map and lambdas fail because GroovyTranslator doesn't account for empty maps when removing the last trailing comma.
To reproduce:
gremlin> identity = new OneArgLambda('it.get()', 'gremlin-groovy') ==>lambda[it.get()] gremlin> bytecode = __.inject([:]).map(identity).asAdmin().getBytecode() ==>[[], [inject({}), map(lambda[it.get()])]] gremlin> client.submit(bytecode).all().get() org.apache.tinkerpop.gremlin.driver.exception.ResponseException: org.codehaus.groovy.control.MultipleCompilationErrorsException: Script9.groovy: 1: expecting ')', found ']' @ line 1, column 31. gremlinscriptengine__g.inject(]).map({it.get()}) ^ 1 error
Attachments
Issue Links
- links to