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

StarGraph does not handle self-loops correctly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.0-incubating, 3.1.2-incubating
    • 3.1.3, 3.2.1
    • hadoop, structure
    • None

    Description

      gremlin> graph = TinkerGraph.open()
      ==>tinkergraph[vertices:0 edges:0]
      gremlin> v = graph.addVertex()
      ==>v[0]
      gremlin> v.addEdge("self",v)
      ==>e[1][0-self->0]
      gremlin>
      gremlin> g = graph.traversal()
      ==>graphtraversalsource[tinkergraph[vertices:1 edges:1], standard]
      gremlin> g.V(0)
      gremlin> g.V(0l)
      ==>v[0]
      gremlin> g.V(0l).bothE()
      ==>e[1][0-self->0]
      ==>e[1][0-self->0]
      gremlin> g.V(0l).outE()
      ==>e[1][0-self->0]
      gremlin> g.V(0l).inE()
      ==>e[1][0-self->0]
      gremlin>
      
      /////////
      
      gremlin> starGraph = org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.of(v)
      ==>stargraph[starOf:v[0]]
      gremlin> sg = starGraph.traversal()
      ==>graphtraversalsource[stargraph[starOf:v[0]], standard]
      gremlin> sg.V(0l)
      ==>v[0]
      gremlin> sg.V(0l).bothE()
      ==>e[1][0-self->0]
      gremlin> sg.V(0l).outE()
      gremlin> sg.V(0l).inE()
      ==>e[1][0-self->0]
      gremlin>
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: