-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[data] Add TopK aggregator #59556
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
base: master
Are you sure you want to change the base?
[data] Add TopK aggregator #59556
Conversation
* Add TopKUnique aggregator that computes most frequent k values Signed-off-by: cem <[email protected]>
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.
Code Review
This pull request introduces a new TopKUnique aggregator, which is a valuable addition for computing the most frequent unique values in a column. The implementation correctly builds upon the existing ValueCounter and utilizes heapq.nlargest for efficient top-k computation. The accompanying tests are thorough, covering basic functionality, global frequency aggregation across blocks, and various edge cases. I have a couple of suggestions for a minor code cleanup to improve readability and a recommendation to enhance test robustness by adding a case for frequency ties.
|
Why is it called |
Yeah TopK would be better; will rename. |
* rename aggregator name * rename default alias name Signed-off-by: cem <[email protected]>
047ae0e to
c322ab8
Compare
Signed-off-by: cem <[email protected]>
Signed-off-by: cem <[email protected]>
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
Description
Add TopKUnique aggregator that computes most frequent k values