Marko A. Rodriguez created TINKERPOP3-966:
---------------------------------------------

             Summary: Support reversible traversals in MatchStep (and 
respective MatchAlgorithms)
                 Key: TINKERPOP3-966
                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-966
             Project: TinkerPop 3
          Issue Type: Improvement
          Components: process
    Affects Versions: 3.1.0-incubating
            Reporter: Marko A. Rodriguez
            Assignee: Marko A. Rodriguez


We currently do not support the reversing of a traversal. Thus,

{code}
g.V().match(
  as("a").out("knows").as("b")
  as("c").out("knows").as("a"))
{code}

will throw an exception saying that it can't compute the patterns. If we can 
convert {{as("c").out("knows").as("a")}} to {{as("a").in("knows").as("c")}} 
then this will work. Furthermore, we need a way to have two versions of a 
traversal pattern available. For instance:

{code}
g.V().match(
  as("a").out("knows").as("b")
  as("a").out("friend").as("b"))
{code}

Given the above patterns, it is possible for both patterns to have a standard 
and a "reversed-form" that can be selected dynamically given the 
match-path-history and pattern statistics. Thus, we need a way to have all four 
patterns able to be selected but once one of the two-pair is selected for a 
traverser, it can't use the other.

In short, we need {{TraversalHelper.reverse(Traversal)}} and 
{{MathStep.MatchAlgorithm}} book-keeping data structures.

cc/ [~mbroecheler]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to