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
Tracking issue for refactoring the SQL query engine to be less unwieldly #497
Problem:
The SQL logic currently parses and plans queries with nested aggregations but executes them incorrectly. It just discards the outer aggregation. This could be fixed, but is architecturally messy. The reason the query engine has become unwieldly is because earlier all queries were getting translated to a struct which would have “metric_name, timestamps, statistic, labels to group by” and this becomes a pain to extend for nested queries or even other queries that may need things like pre-filtering based on some label or a HAVING clause, etc
Approach:
I am thinking of removing any planning/execution support for nested that exists today (since its anyways incorrect), and then tackle this using the ASAPController’s IR abstraction. If we remove support for this, everything can be folded into the SpatioTemporal query type, and thus be query type-agnostic.
For this purpose, I think we should do the following:
Activity
milindsrivastava1997 commentedon Jul 10, 2026
Closed by #504 and #511