-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TINKERPOP-2891] Improved handling for negative values in CountStrategy #2021
Conversation
@@ -178,7 +178,7 @@ public void apply(final Traversal.Admin<?, ?> traversal) { | |||
} | |||
} | |||
} else { | |||
TraversalHelper.insertBeforeStep(new RangeGlobalStep<>(traversal, 0L, highRange), curr, traversal); | |||
TraversalHelper.insertBeforeStep(new RangeGlobalStep<>(traversal, 0L, highRange < 0 ? 0 : highRange), curr, traversal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like highRange is a Long, should these comparisons be in Long too?
TraversalHelper.insertBeforeStep(new RangeGlobalStep<>(traversal, 0L, highRange < 0 ? 0 : highRange), curr, traversal); | |
TraversalHelper.insertBeforeStep(new RangeGlobalStep<>(traversal, 0L, highRange < 0L ? 0L : highRange), curr, traversal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
widening casting
should handle this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is more of a nit style/format comment since previous comparisons are done as Long.
VOTE +1 |
Codecov Report
@@ Coverage Diff @@
## 3.5-dev #2021 +/- ##
=============================================
- Coverage 69.33% 64.16% -5.18%
=============================================
Files 866 25 -841
Lines 41219 3750 -37469
Branches 5432 0 -5432
=============================================
- Hits 28581 2406 -26175
+ Misses 10722 1166 -9556
+ Partials 1916 178 -1738 see 841 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
VOTE+1 |
VOTE +1 |
Fixed optimization of
count
step insideCountStrategy
.queries like
g.V().where(__.in().count().is(eq(-3)))
andg.V().where(__.in().count().is(eq(-2)))
are now correctly optimized asg.V().where(__.in().limit(0).count().is(eq(-2)))
https://issues.apache.org/jira/browse/TINKERPOP-2891