Commit 1390b5e
fix: disable overflow passthrough for distinct aggregates
COUNT(DISTINCT) and similar distinct aggregates produce per-row
intermediate state when convert_to_state is called. In overflow
mode this turns 100M rows into 100M single-value state objects
that the downstream must merge — a 12x regression on Q9.
Fix: skip overflow passthrough when any aggregate is distinct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 01835ce commit 1390b5e
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
678 | 681 | | |
679 | 682 | | |
680 | 683 | | |
| 684 | + | |
681 | 685 | | |
682 | 686 | | |
683 | 687 | | |
| |||
0 commit comments