Daniel Kuppitz created TINKERPOP-1597:
-----------------------------------------
Summary: PathRetractionStrategy messing up certain traversals
Key: TINKERPOP-1597
URL: https://issues.apache.org/jira/browse/TINKERPOP-1597
Project: TinkerPop
Issue Type: Bug
Components: process
Affects Versions: 3.3.0
Reporter: Daniel Kuppitz
There are certain types of traversals that do not work when
{{PathRetractionStrategy}} is included. This ticket discusses one specific case
that is only reproducible in {{3.3.0-SNAPSHOT}} / current {{master/}}.
Here's the traversal and the expected result:
{noformat}
gremlin>
g.withoutStrategies(PathRetractionStrategy).V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b").select("a","b").,
project("a").by(select("a")))
==>[a:v[2]]
==>[a:v[1],b:e[9][1-created->3]]
==>[a:v[1],b:e[7][1-knows->2]]
==>[a:v[1],b:e[8][1-knows->4]]
{noformat}
With {{PathRetractionStrategy}} included we get:
{noformat}
gremlin> g.V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b"),
select("a","b"), project("a").by(select("a")))
==>[a:v[2]]
{noformat}
What's interesting is, that the following 2 traversals compile to the same
final traversal (according to {{.explain()}}):
{noformat}
g.withoutStrategies(PathRetractionStrategy).V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b").barrier(2500),
select("a","b").barrier(2500), project("a").by(select("a").barrier(2500)))
g.V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b"),
select("a","b"), project("a").by(select("a")))
{noformat}
...but the one w/ {{PathRetractionStrategy}} still returns the wrong result,
while the other traversal returns the expected result.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)