You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(sql-utilities, query-engine): add SQL ORDER BY and LIMIT support for grouped aggregate queries. #363
ASAPQuery currently rejects grouped aggregate queries that include ORDER BY or LIMIT, even when the aggregation itself is already supported and precomputed.
For example, the following query falls through with destination=none_unsupported: SELECT proto, srcip, dstip, quantile(0.99)(pkt_len) AS p99_pkt_len FROM netflow_table WHERE time BETWEEN DATEADD(s, -11, NOW()) AND DATEADD(s, -10, NOW()) GROUP BY proto, srcip, dstip ORDER BY p99_pkt_len DESC LIMIT 10
This blocks common analytics patterns such as sorting aggregate results by percentile/sum/count metrics.
Success Criteria
Queries with supported grouped aggregations continue to match the existing precomputed aggregation path when ORDER BY and/or LIMIT are present.
ORDER BY on the aggregate alias or aggregate expression is accepted.
LIMIT is accepted.
Existing aggregation matching and execution behavior remains unchanged aside from applying ordering/limit to the result set.
Activity