tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject [13/19] tinkerpop git commit: TINKERPOP-1642 Fixed up some execution problems after rebase
Date Thu, 30 Mar 2017 21:03:57 GMT
TINKERPOP-1642 Fixed up some execution problems after rebase

The logic still doesn't seem quite right but at least the tests pass and a complete build
is achieved. The issue is related to new stuff added in PathRetractionStrategy on TINKERPOP-1652.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/acc8d739
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/acc8d739
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/acc8d739

Branch: refs/heads/master
Commit: acc8d7399e291a8c9a517d223dea846c1c67d7c3
Parents: 97141da
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Mar 27 14:03:26 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Wed Mar 29 11:22:58 2017 -0400

----------------------------------------------------------------------
 .../strategy/optimization/PathRetractionStrategy.java       | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/acc8d739/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
index 443e4e3..10e2372 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
@@ -78,15 +78,20 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy<Trav
         // do not apply this strategy if a VertexProgramStep is present with LABELED_PATH
requirements
         if ((traversal.getParent() instanceof EmptyStep || traversal.getParent() instanceof
VertexProgramStep) &&
                 TraversalHelper.anyStepRecursively(step -> step instanceof LambdaHolder
||
-                                                   step.getRequirements().contains(TraverserRequirement.PATH)
||
-                                                   (step instanceof VertexProgramStep &&
step.getRequirements().contains(TraverserRequirement.LABELED_PATH)),traversal))
+                                                   step.getRequirements().contains(TraverserRequirement.PATH),traversal))
{
             TraversalHelper.applyTraversalRecursively(t -> t.getEndStep().addLabel(MARKER),
traversal);
+        }
 
         if (traversal.getEndStep().getLabels().contains(MARKER)) {
             traversal.getEndStep().removeLabel(MARKER);
             return;
         }
 
+        if (TraversalHelper.anyStepRecursively(step -> step instanceof VertexProgramStep
&& step.getRequirements().contains(TraverserRequirement.LABELED_PATH),
+                TraversalHelper.getRootTraversal(traversal))) {
+            return;
+        }
+
         final boolean onGraphComputer = TraversalHelper.onGraphComputer(traversal);
         final Set<String> foundLabels = new HashSet<>();
         final Set<String> keepLabels = new HashSet<>();


Mime
View raw message