v.21.7Improvement
Correct Memory Tracking in topK Aggregate Function
Correct memory tracking in aggregate function topK. This closes #25259. #25260 (alexey-milovidov).Why it matters
This feature fixes incorrect memory usage accounting in thetopK aggregate function, ensuring accurate resource tracking and preventing potential memory mismanagement. It improves reliability and stability when using topK in queries.How to use it
No special action required from users. The fix is applied internally, so using thetopK aggregate function in queries will automatically benefit from correct memory tracking.