[
https://issues.apache.org/jira/browse/TINKERPOP-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040018#comment-17040018
]
Stephen Mallette commented on TINKERPOP-2340:
---------------------------------------------
I'm not sure what the problem is, but the {{explain()}} for both traversals
shows an interesting difference I think - first without {{dedup()}}
{code}
Original Traversal [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
ConnectiveStrategy [D] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
MatchPredicateStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
FilterRankingStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
EarlyLimitStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
InlineFilterStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
CountStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
PathRetractionStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
LazyBarrierStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
TinkerGraphCountStrategy [P] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)],
[MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)], [MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)], [MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)], [MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
Final Traversal [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)], [MatchStartStep(X),
WherePredicateStep(neq(Y)), MatchEndStep]]), SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
{code}
then with it:
{code}
Original Traversal [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), DedupGlobalStep,
WherePredicateStep(X,neq(Y)), SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
ConnectiveStrategy [D] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), DedupGlobalStep,
WherePredicateStep(X,neq(Y)), SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
MatchPredicateStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), DedupGlobalStep,
WherePredicateStep(X,neq(Y)), SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
FilterRankingStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
EarlyLimitStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
InlineFilterStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
CountStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
PathRetractionStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
LazyBarrierStrategy [O] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
TinkerGraphCountStrategy [P] [GraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), GraphStep(vertex,[])@[Y], VertexStep(
OUT,[created],vertex), MatchEndStep(V)],
[MatchStartStep(Z), PropertiesStep([name],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(V), PropertiesStep([name],value), M
atchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndStep(DEV_Y)]]
), WherePredicateStep(X,neq(Y)),
DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y, SOFTWARE])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)]]),
WherePredicateStep(X,neq(Y)), DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)]]),
WherePredicateStep(X,neq(Y)), DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)]]),
WherePredicateStep(X,neq(Y)), DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
Final Traversal [TinkerGraphStep(vertex,[]),
MatchStep(AND,[[MatchStartStep(X), VertexStep(OUT,[created],vertex),
MatchEndStep(Z)], [MatchStartStep(X), TinkerGraphStep(vertex,[])@[Y],
VertexStep(OUT,[created],vertex),
MatchEndStep(V)], [MatchStartStep(Z), PropertiesStep([name],value),
MatchEndStep(SOFTWARE)], [MatchStartStep(V), PropertiesStep([nam
e],value), MatchEndStep(SOFTWARE)],
[MatchStartStep(X), PropertiesStep([name],value), MatchEndStep(DEV_X)],
[MatchStartStep(Y), PropertiesStep([name],value), MatchEndS
tep(DEV_Y)]]),
WherePredicateStep(X,neq(Y)), DedupGlobalStep, SelectStep(last,[DEV_X, DEV_Y,
SOFTWARE])]
{code}
> MatchStep with VertexStep - Neither the sideEffects, map, nor path has a Y-key
> ------------------------------------------------------------------------------
>
> Key: TINKERPOP-2340
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2340
> Project: TinkerPop
> Issue Type: Bug
> Affects Versions: 3.4.5
> Environment: TinkerPop 3.4.5
> Reporter: Anton
> Priority: Major
>
> Using Tinkerpop Modern graph, find all pairs of people who worked on software
> with the same name, filtering out pairs that would bind X and Y to the same
> person, using MATCH traversal:
> {noformat}
> g.V().match(
> __.as("X").out("created").as("Z"),
> __.as("X").V().as("Y").out("created").as("V"),
> __.as("Z").values("name").as("SOFTWARE"),
> __.as("V").values("name").as("SOFTWARE"),
> __.as("X").values("name").as("DEV_X"),
> __.as("Y").values("name").as("DEV_Y")
> ).where("X", P.neq("Y"))
> .select("DEV_X", "DEV_Y", "SOFTWARE")
> {noformat}
> The above fails with:
> {noformat}
> java.lang.IllegalArgumentException: Neither the sideEffects, map, nor path
> has a Y-key: WherePredicateStep(neq(Y))
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.Scoping.getScopeValue(Scoping.java:124)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep.setPredicateValues(WherePredicateStep.java:82)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep.filter(WherePredicateStep.java:103)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:38)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep.processNextStart(WherePredicateStep.java:150)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep$MatchEndStep.processNextStart(MatchStep.java:569)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:197)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep.standardAlgorithm(MatchStep.java:371)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep.processNextStart(ComputerAwareStep.java:46)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectStep.processNextStart(SelectStep.java:156)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:128)
> at
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:38)
> at
> org.apache.tinkerpop.gremlin.process.traversal.Traversal.fill(Traversal.java:181)
> at
> org.apache.tinkerpop.gremlin.process.traversal.Traversal.toList(Traversal.java:119)
> {noformat}
> Adding an extra dedup() step makes it work:
> {noformat}
> g.V().match(
> __.as("X").out("created").as("Z"),
> __.as("X").V().as("Y").out("created").as("V"),
> __.as("Z").values("name").as("SOFTWARE"),
> __.as("V").values("name").as("SOFTWARE"),
> __.as("X").values("name").as("DEV_X"),
> __.as("Y").values("name").as("DEV_Y")
> ).dedup().where("X", P.neq("Y"))
> .select("DEV_X", "DEV_Y", "SOFTWARE")
> {noformat}
> returns:
> {noformat}
> {DEV_X=marko, DEV_Y=josh, SOFTWARE=lop}
> {DEV_X=marko, DEV_Y=peter, SOFTWARE=lop}
> {DEV_X=josh, DEV_Y=marko, SOFTWARE=lop}
> {DEV_X=josh, DEV_Y=peter, SOFTWARE=lop}
> {DEV_X=peter, DEV_Y=marko, SOFTWARE=lop}
> {DEV_X=peter, DEV_Y=josh, SOFTWARE=lop}
> {noformat}
> This seems to be related to TINKERPOP-1762.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)