[Bench] Avoid concat_batches in hash join#20944
[Bench] Avoid concat_batches in hash join#20944Dandandan wants to merge 27 commits intoapache:mainfrom
Conversation
|
run benchmarks |
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
|
|
run benchmarks |
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
|
|
run benchmarks |
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
- Remove left_index_to_row closure parameter (only single-batch uses element-wise path, where packed == row index) - Hoist fallback row_indices and il_indices outside the key loop (lazy-allocated, computed once, reused across keys) - Replace scalar bitmap AND loop with word-level byte-slice AND via and_bitmap_with_boolean_buffer helper Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
run benchmarks |
|
Benchmark for this request failed. Last 20 lines of output: Click to expand |
2 similar comments
|
Benchmark for this request failed. Last 20 lines of output: Click to expand |
|
Benchmark for this request failed. Last 20 lines of output: Click to expand |
|
run benchmarks |
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
|
The multi-batch path in equal_rows_arr was using interleave() to materialize intermediate arrays, which is slower than the old take()-on-concatenated-keys approach. This adds compare_rows_elementwise_multi which decodes packed indices (batch_idx << 32 | row_idx) and compares values directly from per-batch arrays, avoiding all intermediate allocation for common key types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…atch API - Extract duplicated DataType match block into dispatch_elementwise! macro used by both single-batch and multi-batch comparison functions - Change compare_rows_elementwise_multi to take &[&ArrayRef] instead of leaking (left_arrays_per_batch, key_idx) internal structure - Pre-compute left null buffers per batch outside the hot loop in do_compare_elementwise_multi Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
run benchmarks |
When merging multiple partitions, CoalescePartitionsExec now coalesces small batches into larger ones (target_batch_size from session config). This benefits downstream operators like hash join whose build side receives fewer, larger batches — enabling the fast single-batch take() path instead of the slower multi-batch interleave() path in build_batch_from_indices. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
|
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
|
|
run benchmarks |
Which issue does this PR close?
Rationale for this change
Hash join (and other joins/operators as well - those can be refactored in a similar way ) currently concatenates the full build side.
When it is relatively large (and perhaps larger than the probe side), this has a few downsides
What changes are included in this PR?
This PR changes it to use
Vec<RecordBatch>and use a composite (u64) index to index into both batches / batch index.Are these changes tested?
Are there any user-facing changes?