Skip to content
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

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

KiterLuc
Copy link
Contributor

@KiterLuc KiterLuc commented Oct 5, 2023

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.

@shortcut-integration
Copy link

@KiterLuc KiterLuc force-pushed the lr/counts-agg-to-agg-w-sum/ch33757 branch 3 times, most recently from c74f083 to 3159ba2 Compare October 5, 2023 10:58
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.
@KiterLuc KiterLuc force-pushed the lr/counts-agg-to-agg-w-sum/ch33757 branch from 3159ba2 to 447f5c8 Compare October 5, 2023 11:04
@KiterLuc KiterLuc requested a review from robertbindar October 5, 2023 12:11
Copy link
Contributor

@robertbindar robertbindar left a 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)
Copy link
Contributor

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.

@robertbindar robertbindar self-requested a review October 13, 2023 13:25
@KiterLuc KiterLuc merged commit eee582d into dev Oct 13, 2023
52 checks passed
@KiterLuc KiterLuc deleted the lr/counts-agg-to-agg-w-sum/ch33757 branch October 13, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants