You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2017/07/12 20:21:06 UTC

[jira] [Closed] (TINKERPOP-1723) Traversal induced value filter bug

     [ https://issues.apache.org/jira/browse/TINKERPOP-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP-1723.
-----------------------------------------
    Resolution: Duplicate

The way that the {{has()}}-traversal was is that the traversal starts at the value and if the result returns something, the {{has()}} passes, if not, it fails. It is confusing and [~dkuppitz] has brought up this issue in another ticket (TINKERPOP-1463). Thus, I'm going to close this ticket given TINKERPOP-1463.

> Traversal induced value filter bug
> ----------------------------------
>
>                 Key: TINKERPOP-1723
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1723
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.5
>         Environment: groovy console
>            Reporter: Robert Dale
>
> http://tinkerpop.apache.org/docs/current/reference/#has-step
> States `has` can take a traversal.  However, it doesn't seem to work as expected.
> {noformat}
> gremlin> graph = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> g = graph.traversal()
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> g.addV().property('name', 'a')
> ==>v[0]
> gremlin> g.addV().property('name', 'b')
> ==>v[2]
> gremlin> g.addV().property('name', 'c')
> ==>v[4]
> // unexpectedly yields all results instead of 0 each iteration because these `names` don't exist
> gremlin> g.inject(['d','e','f']).unfold().as('a').V().has('name',select('a'))
> ==>v[0]
> ==>v[2]
> ==>v[4]
> ==>v[0]
> ==>v[2]
> ==>v[4]
> ==>v[0]
> ==>v[2]
> ==>v[4]
> // works as expected for addV().property() creating 3 new vertices
> gremlin> g.inject(['d','e','f']).unfold().as('a').addV().property('name',select('a'))
> ==>v[6]
> ==>v[8]
> ==>v[10]
> gremlin> g.V().valueMap()
> ==>[name:[a]]
> ==>[name:[b]]
> ==>[name:[c]]
> ==>[name:[d]]
> ==>[name:[e]]
> ==>[name:[f]]
> gremlin> 
> {noformat}
> This happens in TinkerGraph and in Neo4jGraph.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)