stephen mallette created TINKERPOP-1693:
-------------------------------------------

             Summary: Tree may produce incorrect results when nodes are not 
unique
                 Key: TINKERPOP-1693
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1693
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.5
            Reporter: stephen mallette


Consider the following:

{code}
gremlin> g = TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V(1).repeat(out()).emit().tree()
==>[v[1]:[v[2]:[],v[3]:[],v[4]:[v[3]:[],v[5]:[]]]]
gremlin> g.V(1).repeat(out()).emit().tree().by(label)
==>[person:[software:[],person:[software:[]]]]
gremlin> g.V(1).repeat(out()).emit().tree().by("name")
==>[marko:[vadas:[],josh:[ripple:[],lop:[]],lop:[]]]
{code}

Since {{Tree}} extends {{HashMap}} we end up with keys having to be unique and 
when they aren't we lose some of the tree structure.




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

Reply via email to