Commit ac59538
Add per-partition hash tables for partial aggregation
Introduce PartitionAggState to support multiple internal hash tables
in partial aggregation. When enabled via AggregateExec::with_num_agg_partitions(),
input rows are hashed by group keys (using the same hash as RepartitionExec)
and routed to separate smaller hash tables for better cache locality.
Defaults to 1 partition (no behavior change). The optimizer can set
higher values when a hash repartition follows the partial aggregate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 40463ea commit ac59538
2 files changed
Lines changed: 534 additions & 185 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
663 | 669 | | |
664 | 670 | | |
665 | 671 | | |
| |||
685 | 691 | | |
686 | 692 | | |
687 | 693 | | |
| 694 | + | |
688 | 695 | | |
689 | 696 | | |
690 | 697 | | |
| |||
705 | 712 | | |
706 | 713 | | |
707 | 714 | | |
| 715 | + | |
708 | 716 | | |
709 | 717 | | |
710 | 718 | | |
| |||
839 | 847 | | |
840 | 848 | | |
841 | 849 | | |
| 850 | + | |
842 | 851 | | |
843 | 852 | | |
844 | 853 | | |
| |||
851 | 860 | | |
852 | 861 | | |
853 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
854 | 869 | | |
855 | 870 | | |
856 | 871 | | |
| |||
0 commit comments