Repository navigation
[data] Add TopK aggregator - #59556
cem-anyscale wants to merge 4 commits into
Conversation
* Add TopKUnique aggregator that computes most frequent k values Signed-off-by: cem <[email protected]>
There was a problem hiding this comment.
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. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
Description
Add TopKUnique aggregator that computes most frequent k values