cypher-for-gremlin
cypher-for-gremlin copied to clipboard
Extra gremlin step
Consider next query
MATCH (n:V)
WHERE n.p = '123'
RETURN count(n)"
And translated gremlin
g.V().hasLabel('V')
.has('p', eq('123'))
.is(neq(' cypher.null'))
.count()
.project('count').by(__.identity())
It seems is
step is redundant here
That extra step introduce some issue for JG optimizer and index can't be used. I think JG optimizer may be improvement too
Translation adds null guards in a lot of places, to avoid Gremlin steps failing on null
or cypher.null
(null placeholder), sometimes redundantly.
Removing useless null guards could be improved, although it is not a straight-forward task.