You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ted Wilmes (JIRA)" <ji...@apache.org> on 2017/01/31 17:08:51 UTC
[jira] (TINKERPOP-1597) PathRetractionStrategy messing up certain
traversals
[ https://issues.apache.org/jira/browse/TINKERPOP-1597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Wilmes closed TINKERPOP-1597.
---------------------------------
Resolution: Fixed
A `PathRetractionStrategy` test has been added to verify the nested `dedup` does not drop labels. The new `OptionalTest` test method provided by [~dkuppitz] is affected by TINKERPOP-1619 so it was not merged as part of this ticket.
> 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
> Assignee: Ted Wilmes
> Fix For: 3.3.0
>
>
> 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.15#6346)