HF RL Explorer

Feature request: Optimize multiple max by / min by aggregations sharing the same comparison key

Feature request: Optimize multiple max by / min by aggregations sharing the same comparison key: a task in LegoFlow-SWE (Harbor dataset). Queries that compute several max by (or min by ) values over the same sorting key perform redundant work: each aggregation independently scans and compares the…

The task

Queries that compute several `max_by` (or `min_by`) values over the same sorting key perform redundant work: each aggregation independently scans and compares the same key. This leads to wasted CPU and extra memory for multiple aggregation states.

Part of Lego-X/LegoFlow-SWE.