Robert Dale created TINKERPOP-1723:
--------------------------------------
Summary: 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)