Commit 5e803f1
perf: optimistic fast path for grace hash join
Skip build-side hash partitioning when the fast path threshold is set.
Instead of always computing hashes and splitting every build batch into
N partitions (only to collect them back together for the fast path),
buffer the build side directly. When the build fits in memory and is
under the threshold, feed it straight to HashJoinExec with zero
partitioning overhead.
Falls back to the partitioned slow path on memory pressure or when the
build exceeds the threshold.
Also fix CometConf fastPathThreshold type from intConf to longConf to
support values > 2 GB without integer overflow, and remove a duplicate
config line in the benchmark TOML.
~4% improvement on both TPC-H and TPC-DS benchmarks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7b7d834 commit 5e803f1
3 files changed
Lines changed: 341 additions & 125 deletions
File tree
- benchmarks/tpc/engines
- common/src/main/scala/org/apache/comet
- native/core/src/execution/operators
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
0 commit comments