-
Notifications
You must be signed in to change notification settings - Fork 185
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
Move counts computation to aggregate_with_count. #4401
Conversation
This pull request has been linked to Shortcut Story #33757: [Refactor] Aggregates: move null-count and count computation to common compute class.. |
c74f083
to
3159ba2
Compare
This moves the computation for the count aggregators to aggregate_with_count. It also merges the unit test with the existing ones for other aggregators. TYPE: IMPROVEMENT DESC: Move counts computation to aggregate_with_count.
3159ba2
to
447f5c8
Compare
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.
Slight change in counts hierarchy, fix and ok push when CI is green, thanks!
@@ -96,4 +88,18 @@ void CountAggregator::copy_to_user_buffer( | |||
} | |||
} | |||
|
|||
NullCountAggregator::NullCountAggregator(FieldInfo field_info) | |||
: CountAggregatorBase(field_info) |
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.
The architecture here is slightly off, NullCountAggregator
should be the derived that has a constructor based on FieldInfo
(which also performs the checks) and CountAggregatorBase
, CountAggregator
should have a default constructor. This will avoid the weird FieldInfo("","",false)
which tries to replace a default constructed FieldInfo which we explicitly deleted.
This moves the computation for the count aggregators to aggregate_with_count. It also merges the unit test with the existing ones for other aggregators.
TYPE: IMPROVEMENT
DESC: Move counts computation to aggregate_with_count.