pietermartin / sqlg

TinkerPop graph over sql
MIT License
247 stars 51 forks source link

Changing location of "as" causes error with path.from when "or" used #382

Closed ktschmidt closed 3 years ago

ktschmidt commented 4 years ago

Using 2.0.1, add a vertex:

g.addV('Test').property('name', 'John').next();

Several traversals all work fine:

g.V().hasLabel('Test').path(); g.V().hasLabel('Test').as('t').path().from('t'); g.V().hasLabel('Test').as('t').has('name', 'John').path().from('t'); g.V().hasLabel('Test').as('t').or(has('name', 'John')).path().from('t'); g.V().hasLabel('Test').as('t').or(has('name', 'John')).path().from('t'); g.V().hasLabel('Test').has('name', 'John').as('t').path().from('t');

But if the as is moved after the has, and an or is used as well, there is an error:

g.V().hasLabel('Test').or(has('name', 'John')).as('t').path().from('t'); Could not locate path from-label: t

My real traversal is more complex, there is a reason for the or, but this simple case reproduces the issue.

Doing the same with TinkerGraph works fine.

pietermartin commented 3 years ago

Can't duplicate the bug on 2.0.3-SNAPSHOT on branch 2020