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 2018/02/17 05:22:33 UTC

[4/4] tinkerpop git commit: Fixed test cases.

Fixed test cases.


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

Branch: refs/heads/TINKERPOP-1777-master
Commit: 7cae75af46c3a1c48db6480f356965f765fb014d
Parents: c1f49ef
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Feb 16 19:15:28 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Feb 16 19:15:28 2018 -0700

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/filter/AndStep.java          | 1 +
 gremlin-test/features/branch/Union.feature                      | 5 ++---
 gremlin-test/features/sideEffect/Group.feature                  | 4 ++--
 .../optimization/interceptor/SparkStarBarrierInterceptor.java   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7cae75af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
index d66dde4..5c20cd8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
@@ -36,6 +36,7 @@ public final class AndStep<S> extends ConnectiveStep<S> {
         for (final Traversal.Admin<S, ?> traversal : this.traversals) {
             if (!TraversalUtil.test(traverser, traversal))
                 return false;
+        }
         return true;
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7cae75af/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 30eb53c..1bd47b8 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -134,7 +134,6 @@ Feature: Step - union()
       | result |
       | d[3].l   |
       | d[0].l   |
-      | d[1.9].d |
       | d[0].i   |
-      | d[0].l   |
-      | d[1].l   |
\ No newline at end of file
+      | d[1.9].d |
+      | d[1].l   |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7cae75af/gremlin-test/features/sideEffect/Group.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Group.feature b/gremlin-test/features/sideEffect/Group.feature
index 94d2191..2686f09 100644
--- a/gremlin-test/features/sideEffect/Group.feature
+++ b/gremlin-test/features/sideEffect/Group.feature
@@ -101,7 +101,7 @@ Feature: Step - group()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"software":"d[0].i", "person":"d[3.5].d"}] |
+      | m[{"person":"d[3.5].d"}] |
 
   Scenario: g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX
     Given the grateful graph
@@ -207,7 +207,7 @@ Feature: Step - group()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"cover":{"followedBy":"d[777982].l", "sungBy":"d[0].i", "writtenBy":"d[0].i"}, "":{"followedBy":"d[179350].l"}, "original":{"followedBy":"d[2185613].l", "sungBy":"d[0].i", "writtenBy":"d[0].i"}}] |
+      | m[{"cover":{"followedBy":"d[777982].l"}, "":{"followedBy":"d[179350].l"}, "original":{"followedBy":"d[2185613].l"}}] |
 
   Scenario: g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX
     Given the modern graph

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7cae75af/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
index 3c89c1d..bd4b5ce 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
@@ -100,7 +100,7 @@ public final class SparkStarBarrierInterceptor implements SparkVertexProgramInte
         if (endStep instanceof CountGlobalStep)
             result = nextRDD.map(Traverser::bulk).fold(0l, (a, b) -> a + b);
         else if (endStep instanceof SumGlobalStep) {
-            result = nextRDD
+            result = nextRDD.isEmpty() ? null : nextRDD
                     .map(traverser -> NumberHelper.mul(traverser.bulk(), (Number) traverser.get()))
                     .fold(0, NumberHelper::add);
         } else if (endStep instanceof MeanGlobalStep) {