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
AQE: switch from streaming aggregation to hash aggregation based on runtime statistics #1989
Is your feature request related to a problem or challenge?
The adaptive execution path does not switch from streaming aggregation to hash aggregation (or vice versa) based on runtime statistics. Streaming aggregation depends on sorted input and assumptions about group cardinality; when runtime statistics contradict the plan-time estimate, the chosen aggregation strategy can be suboptimal.
Describe the solution you'd like
Add an adaptive physical optimizer rule that reconsiders the aggregation strategy for not-yet-resolved aggregate stages using exact runtime statistics (input ordering, group cardinality), switching between streaming and hash aggregation as appropriate.
Context
This is one of the documented limitations of the experimental Adaptive Query Execution (AQE) path, listed in docs/source/user-guide/tuning-guide.md under "Current limitations" and in the doc comment on AdaptiveExecutionGraph (ballista/scheduler/src/state/aqe/mod.rs). Filing a discrete tracking issue so the gap is visible outside the doc.
Activity