Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
3.3.2
-
None
-
None
-
GremlinGroovyScriptEngine with GroovyCompilerGremlinPlugin and COMPILE_STATIC
Description
When using the GremlinGroovyScriptEngine together with GroovyCompilerGremlinPlugin and compilation option COMPILE_STATIC it is required to use long literals instead of integer literals in predicates. For example the following query fails during compilation:
g.V().where(outE().count().is(lt(50)))
This gives the following error message:
Script1.groovy: 1: [Static type checking] - Cannot call org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal <org.apache.tinkerpop.gremlin.structure.Vertex, java.lang.Long>#is(org.apache.tinkerpop.gremlin.process.traversal.P <java.lang.Long>) with arguments [org.apache.tinkerpop.gremlin.process.traversal.P <java.lang.Integer>] @ line 1, column 13. g.V().where(outE().count().is(lt(50))) ^ Script1.groovy: 1: [Static type checking] - Cannot find matching method org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal#where(java.lang.Object). Please check if the declared type is correct and if the method exists. @ line 1, column 1. g.V().where(outE().count().is(lt(50)))
Changing the query to use long literals makes the query work:
g.V().where(outE().count().is(lt(50L)))
The original query works with version 3.2.8 or if COMPILE_STATIC is NOT used.