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
fix: use emit+reset strategy for distinct aggregates
Distinct aggregates (COUNT(DISTINCT)) benefit from periodic
emit+reset (1.45x faster on Q9) but are catastrophically slow
with overflow passthrough (12x slower) because convert_to_state
produces per-row state objects.
Now uses two strategies based on aggregate type:
- Non-distinct: overflow passthrough (convert_to_state, no reset)
- Distinct: emit+reset (state() serializes HashSets compactly)
Both strategies keep the hash table within the configured size
limit for better cache performance.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments