v.19.11Improvement

Better Quality of Topk Function

Better quality of topK function. Changed the SavingSpace set behavior to remove the last element if the new element have a bigger weight. #5833 #5850 (Guillaume Tassery)
Improved the quality of the topK aggregate function by modifying the behavior of the SavingSpace set to remove the last element when a new element with a bigger weight appears.

Why it matters

This enhancement addresses the issue of ensuring that topK more accurately reflects the elements with the highest weights, providing better accuracy and more reliable results for users analyzing top-K frequent elements in datasets.

How to use it

Users implicitly benefit from this improvement when using the topK aggregate function in their queries. No special configuration is needed; the function now internally handles element weights more effectively.