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

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.4.9
    • 3.5.0
    • process

    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

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

            Dates

              Created:
              Updated:
              Resolved: