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

PathRetractionStrategy returns inconsistent results when match() is not detected as the final step

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.4.9
    • Fix Version/s: 3.5.0
    • Component/s: process
    • Labels:

      Description

      This issue comes from TINKERPOP-2481 where it was originally noted that perhaps IdentityRemovalStrategy had something to do with the following:

      gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
      ==>[]
      ==>[]
      gremlin> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
      ==>[a:v[1],b:v[2]]
      ==>[a:v[1],b:v[4]]
      gremlin> g.withoutStrategies(PathRetractionStrategy).V().match(__.as("a").out("knows").as("b")).identity()
      ==>[a:v[1],b:v[2]]
      ==>[a:v[1],b:v[4]]
      gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold()
      gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold().path()
      ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],a=v[1]]
      ==>[v[1],v[1],v[2],[a:v[1],b:v[2]],b=v[2]]
      ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],a=v[1]]
      ==>[v[1],v[1],v[4],[a:v[1],b:v[4]],b=v[4]]
      

      but it is not a good idea to fix the behavior of one strategy by way of another so PathRetractionStrategy needs to get a bit smarter.

        Attachments

          Activity

            People

            • Assignee:
              spmallette Stephen Mallette
              Reporter:
              spmallette Stephen Mallette
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: