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

getScopeKeys should respect the order of keys passed in Step

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.6.0, 3.4.13, 3.5.3
    • 3.7.0, 3.6.1, 3.5.4
    • process
    • None

    Description

      Right now, Scoping#getScopeKeys return Set<String> to return all keys used in scoping.

      Depending on each Step's implementation, this loses the information of the order of keys. For example, SelectStep stores keys as HashSet

      https://github.com/apache/tinkerpop/blob/cf95caaf139b5570d0c2d509b74f6f6cb561ffaf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectStep.java#L61

      When GraphProvider implements their own optimization for SelectStep, naturally they want to access this keys, but let's say when a query has select('a', 'b'), the GraphProvider can only know there are keys 'a' and 'b' and cannot see which comes first because it returns as HashSet.

      This blocks them from performing their own by-traversal for each key, because applying by-traversals is done in round-robin manner and the order is critical information to process.

      For now, I am adding a getter of the list for a provider.

      https://github.com/apache/tinkerpop/pull/1726

      Attachments

        Activity

          People

            bechbd Dave Bechberger
            redtree1112 Norio Akagi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: