You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/08/03 16:11:06 UTC

[1/2] incubator-tinkerpop git commit: fixed bug in IncidentToAdjacentStrategy

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 227333563 -> eeb55da75


fixed bug in IncidentToAdjacentStrategy


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

Branch: refs/heads/master
Commit: 00be574f07a15f8cd84c9d3d5e7aefcdc8942fb6
Parents: 2879463
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Aug 3 16:10:11 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Aug 3 16:10:11 2015 +0200

----------------------------------------------------------------------
 .../strategy/optimization/IncidentToAdjacentStrategy.java        | 4 +++-
 .../strategy/optimization/IncidentToAdjacentStrategyTest.java    | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/00be574f/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 b26f0e8..5111e74 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
@@ -29,7 +29,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.javatuples.Pair;
 
@@ -119,6 +118,9 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy<
      */
     private static void optimizeSteps(final Traversal.Admin traversal, final VertexStep step1, final Step step2) {
         final Step newStep = new VertexStep(traversal, Vertex.class, step1.getDirection(), step1.getEdgeLabels());
+        for (final String label : (Iterable<String>) step2.getLabels()) {
+            newStep.addLabel(label);
+        }
         TraversalHelper.replaceStep(step1, newStep, traversal);
         traversal.removeStep(step2);
     }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/00be574f/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java
index e69c728..45f583e 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java
@@ -130,7 +130,8 @@ public class IncidentToAdjacentStrategyTest {
                     {__.outE().as("a").inV(), __.outE().as("a").inV()}, // todo: this can be optimized, but requires a lot more checks
                     {__.outE().inV().path(), __.outE().inV().path()},
                     {__.outE().inV().map(lambda), __.outE().inV().map(lambda)},
-                    {__.union(__.outE().inV(), __.inE().outV()).path(), __.union(__.outE().inV(), __.inE().outV()).path()}});
+                    {__.union(__.outE().inV(), __.inE().outV()).path(), __.union(__.outE().inV(), __.inE().outV()).path()},
+                    {__.as("a").outE().inV().as("b"), __.as("a").out().as("b")}});
         }
     }
 }


[2/2] incubator-tinkerpop git commit: Merge branch 'tp30'

Posted by dk...@apache.org.
Merge branch 'tp30'


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

Branch: refs/heads/master
Commit: eeb55da75e2a28479646eff908efdb89a0c5a5d4
Parents: 2273335 00be574
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Aug 3 16:10:53 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Aug 3 16:10:53 2015 +0200

----------------------------------------------------------------------
 .../strategy/optimization/IncidentToAdjacentStrategy.java        | 4 +++-
 .../strategy/optimization/IncidentToAdjacentStrategyTest.java    | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------