-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Make the SBE stage builder run an eligible scalar $group on CompactHashAggStage, behind featureFlagSbeCompactHashAgg, which stays off by default. The stage builder picks CompactHashAggStage only when all of these hold; otherwise it builds HashAggStage as before.
- featureFlagSbeCompactHashAgg is enabled.
- allowDiskUse is false, since the compact stage cannot spill yet.
- Every accumulator has a compact implementation ($sum and $push for now). A $group with no accumulators qualifies.
- With the flag on, results are bitwise equal to HashAggStage; with the flag off, plans and results do not change.