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 2016/05/27 11:48:30 UTC
[03/12] incubator-tinkerpop git commit: Fixed the previous commit. We
don't want to increase the step offset, but decrease the traversal size,
after removing steps from a traversal.
Fixed the previous commit. We don't want to increase the step offset, but decrease the traversal size, after removing steps from a traversal.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/041c0333
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/041c0333
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/041c0333
Branch: refs/heads/master
Commit: 041c0333b3ed4d765fcd4afa5d81666bcac0541d
Parents: bffa77f
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed May 25 21:55:27 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri May 27 13:25:36 2016 +0200
----------------------------------------------------------------------
.../traversal/strategy/optimization/RangeByIsCountStrategy.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/041c0333/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 1b544c2..efa79e6 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
@@ -70,7 +70,7 @@ public final class RangeByIsCountStrategy extends AbstractTraversalStrategy<Trav
@Override
public void apply(final Traversal.Admin<?, ?> traversal) {
- final int size = traversal.getSteps().size();
+ int size = traversal.getSteps().size();
Step prev = null;
for (int i = 0; i < size; i++) {
final Step curr = traversal.getSteps().get(i);
@@ -109,7 +109,7 @@ public final class RangeByIsCountStrategy extends AbstractTraversalStrategy<Trav
if (useNotStep) {
traversal.asAdmin().removeStep(next); // IsStep
traversal.asAdmin().removeStep(curr); // CountStep
- i += 2;
+ size -= 2;
final Traversal.Admin inner = __.start().asAdmin();
TraversalHelper.insertAfterStep(prev, inner.getStartStep(), inner);
TraversalHelper.replaceStep(prev, new NotStep<>(traversal, inner), traversal);