-
Notifications
You must be signed in to change notification settings - Fork 112
Implementation of grouping size aggregator #3577
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
Conversation
...le/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingContinuation.java
Show resolved
Hide resolved
...m/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsCollectorCursor.java
Show resolved
Hide resolved
...om/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursor.java
Outdated
Show resolved
Hide resolved
...om/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursor.java
Outdated
Show resolved
Hide resolved
...om/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursor.java
Outdated
Show resolved
Hide resolved
...om/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursor.java
Outdated
Show resolved
Hide resolved
...a/com/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsResultsTest.java
Outdated
Show resolved
Hide resolved
...a/com/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsResultsTest.java
Outdated
Show resolved
Hide resolved
...pple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursorTest.java
Outdated
Show resolved
Hide resolved
...pple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursorTest.java
Outdated
Show resolved
Hide resolved
- Change lifecycle to allow multiple onNext calls for an instance - Add boolean marker to continuation - Static import assertThat - Supply executor to whileTrue
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.
LGTM. I left a few small things that you could address at your discretion
...om/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursor.java
Outdated
Show resolved
Hide resolved
...a/com/apple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsResultsTest.java
Outdated
Show resolved
Hide resolved
...pple/foundationdb/record/provider/foundationdb/cursors/SizeStatisticsGroupingCursorTest.java
Outdated
Show resolved
Hide resolved
…ake proto boolean optional.
// Default to false | ||
return (statsContinuation.hasLastResultContinuation() && | ||
statsContinuation.getLastResultContinuation()); |
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.
This isn't wrong, but getLastResultContinuation()
should return false
(not, say, null
) if the field is unset, so this should be logically equivalent to:
// Default to false | |
return (statsContinuation.hasLastResultContinuation() && | |
statsContinuation.getLastResultContinuation()); | |
// Default to false | |
return statsContinuation.getLastResultContinuation()); |
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.
Sure, done.
This implementation is creating a flavor of the
SizeStatisticsCollectorCursor
that can return sizes aggregated by sub-subspaces.This relies on the original implementation but had to go into a separate class as the generic type of the cursor has changed.
Eventually, the original cursor can be replaced by this one with the aggregation size being "0".
For backwards compatibility, the original class was marked as "deprecated". The original
SizeStatisticsResults
was marked as deprecated and a new (non-embedded version) of it was added.Initially, I thought that we can make a backwards-compatible change to the
SizeStatisticsCollectorCursor
class, but that proved more complicated with the changes to the result type, so I decided to go with a new implementation instead.Resolves #3576