Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1693

Tree may produce incorrect results when nodes are not unique

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 3.2.5
    • None
    • process
    • None

    Description

      Consider the following:

      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:[]]]
      

      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.

      Attachments

        Issue Links

          Activity

            People

              okram Marko A. Rodriguez
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: