Repository navigation
fix: use nested loop join for nested piecewise merge keys - #26043
Open
mikamikasuki wants to merge 1 commit into
Open
mikamikasuki wants to merge 1 commit into
mikamikasuki wants to merge 1 commit into
Conversation
jayzhan211
enabled auto-merge
October 5, 2026 13:53
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26043 +/- ##
==========================================
- Coverage 82.66% 82.66% -0.01%
==========================================
Files 1147 1147
Lines 446357 446395 +38
Branches 446357 446395 +38
==========================================
+ Hits 368971 369002 +31
- Misses 54997 55001 +4
- Partials 22389 22392 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 5, 2026
Contributor
|
Thanks for the fix. The root cause seem to be sorting and comparison don't agree in PWMJ, is it possible to fix that directly? If that's tricky, this PR's approach totally makes sense, but we would keep the issue open, and add a note for the remaining fix to the root cause. |
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
With piecewise merge joins enabled, nested range-key comparisons can return incorrect results when an array contains an inner NULL. Struct range keys can also fail with an unsupported-sort error. Both cases should preserve SQL comparison semantics and execute successfully.
What changes are included in this PR?
NestedLoopJoinExecwhenever either piecewise merge join range key has a nested datatype.What is the testing strategy for this PR?
cargo test --test sqllogictests -- piecewise_merge_join_nested_nullscargo test --test sqllogictests -- pwmjcargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningsRUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryptiongit diff --checkAre there any user-facing changes?
Nested range joins return SQL-correct results when nested values contain NULLs, and Struct range keys no longer fail with an unsupported-sort error. There are no public API changes.