You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Daniel Kuppitz (JIRA)" <ji...@apache.org> on 2017/01/11 13:54:58 UTC

[jira] [Commented] (TINKERPOP-1597) PathRetractionStrategy messing up certain traversals

    [ https://issues.apache.org/jira/browse/TINKERPOP-1597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15818398#comment-15818398 ] 

Daniel Kuppitz commented on TINKERPOP-1597:
-------------------------------------------

I created a branch and added the (failing) test case.

https://github.com/apache/tinkerpop/tree/TINKERPOP-1597

> 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)