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

having order() before fold() omits an empty list in GroupStep's value traversal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.6.4
    • None
    • tinkergraph
    • None

    Description

      Using the modern graph,

      gremlin> g.V().group().by().by(out().fold())
      ==>[v[1]:[v[3],v[2],v[4]],v[2]:[],v[3]:[],v[4]:[v[5],v[3]],v[5]:[],v[6]:[v[3]]]

      out().fold() produces an empty list when there is no solution for out() in a value traversal of GroupStep. However if I put order() those empty lists are gone.

      gremlin> g.V().group().by().by(out().order().fold())
      ==>[v[1]:[v[2],v[3],v[4]],v[4]:[v[3],v[5]],v[6]:[v[3]]]

      I think this is not an expected behavior. 

      I don't see the similar effect in by() itself

      gremlin> g.V().as("a").select("a").by(out().fold())
      ==>[v[3],v[2],v[4]]
      ==>[]
      ==>[]
      ==>[v[5],v[3]]
      ==>[]
      ==>[v[3]]
      
      gremlin> g.V().as("a").select("a").by(out().order().fold())
      ==>[v[2],v[3],v[4]]
      ==>[]
      ==>[]
      ==>[v[3],v[5]]
      ==>[]
      ==>[v[3]]

      So likely this is GroupStep specific issue. We need to investigate how this occurs and fix if needed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            redtree1112 Norio Akagi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: