Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/714#discussion_r138940544
--- Diff:
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java
---
@@ -99,6 +99,9 @@
{__.and(__.out().count().is(0), __.in().count().is(1)),
__.and(__.not(__.out()), __.in().limit(2).count().is(1))},
{__.and(__.out().count().is(1), __.in().count().is(0)),
__.and(__.out().limit(2).count().is(1), __.not(__.in()))},
{__.or(__.out().count().is(0), __.in().count().is(0)),
__.or(__.not(__.out()), __.not(__.in()))},
+ {__.path().filter(__.count().is(gte(0.5))).limit(5),
__.path().identity().limit(5)}, // unfortunately we can't just remove the
filter step
--- End diff --
It breaks other parts of the code when you attempt to modify the parent
traversal, in particular when you remove one or more steps. I don't remember
where the exception was thrown, but it was an `IndexOutOfBoundsException`. So
apparently there's a `for` loop with an upper bound that is only initialized
once (which is good, I wouldn't like to recount the steps in each iteration).
---