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

Allow reducing barriers in repeat()

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      The following query transforms the modern graph into layers:

      gremlin> g.V(1).aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup().
      ......1>        aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup().
      ......2>        aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup().
      ......3>        cap("x").next()
      ==>[v[1]]
      ==>[v[3],v[2],v[4]]
      ==>[v[6],v[5]]
      

      The index of each list represents the minimum distance of the vertices it contains from v[1].

      There's obviously a lot of code duplication, but even worse: the max. depth has to be known upfront. repeat() could solve that, but currently fails if it contains a reducing barrier step (in OLTP and OLAP).

      gremlin> g.V(1).repeat(aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup()).cap("x").next()
      The parent of a reducing barrier can not be repeat()-step: FoldStep
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dkuppitz Daniel Kuppitz

            Dates

              Created:
              Updated:

              Slack

                Issue deployment