tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject tinkerpop git commit: I hate you Travis
Date Fri, 16 Mar 2018 00:31:44 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TRAVIS-TEST 6bca797e6 -> b7ed64d61


I hate you Travis


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

Branch: refs/heads/TRAVIS-TEST
Commit: b7ed64d6198844838e3f18720ca9295b7a63417a
Parents: 6bca797
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Thu Mar 15 17:31:35 2018 -0700
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Thu Mar 15 17:31:35 2018 -0700

----------------------------------------------------------------------
 .../step/map/TraversalVertexProgramStep.java          |  3 +++
 .../strategy/decoration/SubgraphStrategy.java         | 14 +++++++++++++-
 .../optimization/IncidentToAdjacentStrategy.java      |  7 ++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b7ed64d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java
index a591a25..642ad00 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java
@@ -24,11 +24,14 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphFilter;
 import org.apache.tinkerpop.gremlin.process.computer.Memory;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.finalization.ComputerFinalizationStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies;
 import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b7ed64d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
index ab9ceb8..ae50126 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
@@ -149,6 +149,18 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
             traversal.getStartStep().removeLabel(MARKER);
             return;
         }
+        for (final Step step : traversal.getSteps()) {
+            if (step instanceof TraversalParent) {
+                for (final Traversal.Admin t : ((TraversalParent) step).getLocalChildren())
{
+                    this.apply(t);
+                    t.getStartStep().addLabel(MARKER);
+                }
+                for (final Traversal.Admin t : ((TraversalParent) step).getGlobalChildren())
{
+                    this.apply(t);
+                    t.getStartStep().addLabel(MARKER);
+                }
+            }
+        }
         //
         final List<GraphStep> graphSteps = TraversalHelper.getStepsOfAssignableClass(GraphStep.class,
traversal);
         final List<VertexStep> vertexSteps = TraversalHelper.getStepsOfAssignableClass(VertexStep.class,
traversal);
@@ -201,7 +213,7 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
         }
 
         if (invalidateTraverserRequirements) {
-            traversal.invalidateTraverserRequirements();
+            //traversal.invalidateTraverserRequirements();
         }
 
         // turn g.V().properties() to g.V().properties().xxx

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b7ed64d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
index f6c66c8..9ec0fef 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
@@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.PathFilterStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
@@ -115,7 +116,7 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy<
         if (step2 instanceof EdgeOtherVertexStep) {
             // bothE().otherV() might have been the only step sequence that required path
tracking. Invalidate the
             // requirements to possibly end up with more optimized traversers.
-            traversal.invalidateTraverserRequirements();
+            //traversal.invalidateTraverserRequirements();
         }
     }
 
@@ -137,6 +138,10 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy<
         final Collection<Pair<VertexStep, Step>> stepsToReplace = new ArrayList<>();
         Step prev = null;
         for (final Step curr : traversal.getSteps()) {
+            if (curr instanceof TraversalParent) {
+                ((TraversalParent) curr).getLocalChildren().forEach(this::apply);
+                ((TraversalParent) curr).getGlobalChildren().forEach(this::apply);
+            }
             if (isOptimizable(prev, curr)) {
                 stepsToReplace.add(Pair.with((VertexStep) prev, curr));
             }


Mime
View raw message