fix: avoid FixedSizeList overflow in hash join build materialization#21023
Open
kumarUjjawal wants to merge 1 commit intoapache:mainfrom
Open
fix: avoid FixedSizeList overflow in hash join build materialization#21023kumarUjjawal wants to merge 1 commit intoapache:mainfrom
kumarUjjawal wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
|
run benchmarks |
|
🤖 Benchmark completed (GKE) | trigger Details
Resource Usagetpch — base (merge-base)
tpch — branch
|
Contributor
|
there is an alternative approach here (still a bit messy code as I was experimenting around) Key points:
That at least avoids regressing TPC-H, still some small regressions on TPC-DS |
|
🤖 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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Issue #20673 describes a panic in FULL OUTER JOIN when the build side includes a
FixedSizeListcolumn and the total element count exceedsu32::MAX.The problem was caused by
HashJoinExecconcatenating the entire build side into a single batch. For FixedSizeList, this leads totake()hitting Arrow’s internalu32indexing limit and panicking.The fix removes the single-batch assumption. Instead, the build side remains batched, and logical row indices are mapped back to their original batches. This avoids creating oversized
FixedSizeListArrayinstances and prevents the panic.What changes are included in this PR?
Fix this by keeping the build side in logical batch order instead of materializing one giant RecordBatch. Add batch-aware helpers for build-side row materialization, join-key equality checks, join filters, and final unmatched-row output, while preserving existing join semantics.
Also add regression coverage for large FixedSizeList build-side indices and unmatched-row output, unit tests for the new batch helpers.
Are these changes tested?
Yes
Are there any user-facing changes?