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

TinkerGraphComputer doesn't handle grouping side-effect steps properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.1
    • None
    • process
    • None

    Description

      As noted in https://github.com/apache/tinkerpop/pull/803, there seems to be an issue in how TinkerGraphComputer processes grouping side-effect steps. Both grouping steps require an extra barrier() step to function properly; other side-effect steps (e.g. aggregate() show the correct / expected behavior.

      gremlin> g = TinkerFactory.createModern().traversal().withComputer()
      ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
      gremlin> g.V().group("a").by("name").select("a")
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      gremlin> g.V().groupCount("a").by("name").select("a")
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      ==>[]
      gremlin> g.V().aggregate("a").by("name").select("a")
      ==>[lop,josh,peter,vadas,ripple,marko]
      ==>[lop,josh,peter,vadas,ripple,marko]
      ==>[lop,josh,peter,vadas,ripple,marko]
      ==>[lop,josh,peter,vadas,ripple,marko]
      ==>[lop,josh,peter,vadas,ripple,marko]
      ==>[lop,josh,peter,vadas,ripple,marko]
      

      Including an extra barrier() which, in my opinion, really shouldn't be necessary in an OLAP job:

      gremlin> g.V().group("a").by("name").barrier().select("a")
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      ==>[josh:[v[4]],ripple:[v[5]],lop:[v[3]],peter:[v[6]],vadas:[v[2]],marko:[v[1]]]
      gremlin> g.V().groupCount("a").by("name").barrier().select("a")
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      ==>[josh:1,ripple:1,lop:1,peter:1,vadas:1,marko:1]
      

      A pull request for this ticket should also remove the extra barrier() step from the test case g_VX1X_groupXaX_byXconstantXaXX_byXnameX_selectXaX_selectXaX.

      I haven't checked 3.2.x yet, but this line of code most likely shows the same issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dkuppitz Daniel Kuppitz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: