Cole-Greer commented on code in PR #3717:
URL: https://github.com/apache/tinkerpop/pull/3717#discussion_r4276111902
##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/CountStrategyTest.java:
##########
@@ -71,7 +71,7 @@ public static Iterable<Object[]> generateTestParameters() {
{__.count().is(-2023), __.limit(0).count().is(-2023)},
{__.count().is(P.between(0, 10)),
__.limit(10).count().is(P.between(0, 10))},
{__.count().is(P.between(5, 10)),
__.limit(10).count().is(P.between(5, 10))},
- {__.count().is(P.gt(10).or(lt(5))),
__.limit(11).count().is(P.gt(10).or(lt(5)))},
+ {__.count().is(P.gt(10).or(lt(5))),
__.count().is(P.gt(10).or(lt(5)))}, // capped count of 11 would pass and be
returned
Review Comment:
I find it surprising that the changes result in this case dropping the
`limit()`, but the limit is retained in all of the above cases:
```
{__.count().is(-2023), __.limit(0).count().is(-2023)},
{__.count().is(P.between(0, 10)), __.limit(10).count().is(P.between(0, 10))},
{__.count().is(P.between(5, 10)), __.limit(10).count().is(P.between(5, 10))},
```
My expectation would be that the limit no longer gets added in all of these
basic `count().is(...)` cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]