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

Stephen Mallette commented on TINKERPOP-2499:
---------------------------------------------

Inconsistency is now exacerbated further with TINKERPOP-2481 completed such 
that {{match().identity()}} and {{match().unfold()}} will behave differently. 
It's been a while but I suppose the motivation for retracting the path 
liberally was to be eager with releasing resources. I'm thinking that this is a 
bit too much magic when we consider the examples in the description and how 
they change with TINKERPOP-2481. 

> PathRetractionStrategy returns inconsistent results when match() is not 
> detected as the final step
> --------------------------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2499
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2499
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.4.9
>            Reporter: Stephen Mallette
>            Priority: Major
>
> This issue comes from TINKERPOP-2481 where it was originally noted that 
> perhaps {{IdentityRemovalStrategy}} had something to do with the following:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> gremlin> 
> g.withoutStrategies(PathRetractionStrategy).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold()
> gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold().path()
> ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],a=v[1]]
> ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],b=v[2]]
> ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],a=v[1]]
> ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],b=v[4]]
> {code}
> but it is not a good idea to fix the behavior of one strategy by way of 
> another so {{PathRetractionStrategy}} needs to get a bit smarter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to