-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
There's a noticeable difference in the evaluation of or()
conditions together with vertex id. Depending on whether the initial vertex lookup is done with g.V().has(T.id, ...)
or g.V(...)
. When using
g.V().has(T.id, 1).or(__.has("prop", "A", __.has("prop", "B")))
the query optimizer (JanusGraphStepStrategy
) folds all conditions into a JanusGraphStep
. This seems to lead to an incorrect evaluation where the or()
behaves like an and()
- in JanusGraphStep
all conditions are evaluated using HasContainer.testAll()
method.
However, the query
g.V(1).or(__.has("prop", "A", __.has("prop", "B")))
produces the correct OR results, because folding is skipped in JanusGraphStepStrategy
.