tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject [04/11] incubator-tinkerpop git commit: Increase step offset by 2 if `foo.count().is(0)` was replaced by `not(foo)`.
Date Fri, 27 May 2016 11:26:35 GMT
Increase step offset by 2 if `foo.count().is(0)` was replaced by `not(foo)`.


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

Branch: refs/heads/tp31
Commit: bffa77f22dda6831c32aa70cd2f1f32d9652993f
Parents: a73ec2f
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Wed May 25 21:33:44 2016 +0200
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Fri May 27 13:25:36 2016 +0200

----------------------------------------------------------------------
 .../traversal/strategy/optimization/RangeByIsCountStrategy.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bffa77f2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
index f3168a3..1b544c2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
@@ -109,6 +109,7 @@ public final class RangeByIsCountStrategy extends AbstractTraversalStrategy<Trav
                         if (useNotStep) {
                             traversal.asAdmin().removeStep(next); // IsStep
                             traversal.asAdmin().removeStep(curr); // CountStep
+                            i += 2;
                             final Traversal.Admin inner = __.start().asAdmin();
                             TraversalHelper.insertAfterStep(prev, inner.getStartStep(), inner);
                             TraversalHelper.replaceStep(prev, new NotStep<>(traversal,
inner), traversal);


Mime
View raw message