fix: preserve outer join equivalences for null rows - #26042
Open
Prajwal-k-tech wants to merge 2 commits into
Open
Prajwal-k-tech wants to merge 2 commits into
Prajwal-k-tech wants to merge 2 commits into
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Author
|
I pushed a regression fix for the CI failure: zero-column batches now preserve their row count, with a focused Full-join test. GitHub marked the new fork workflow runs as |
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?
coalesce/CASE#26036.Rationale for this change
After a LEFT, RIGHT, or FULL OUTER JOIN, the nullable side can contain rows whose columns were extended with NULLs. An equivalence such as
b = coalesce(a, 0)is true on the input rows but does not remain true for those null-extended rows. Retaining it can lead to incorrect ordering and LIMIT results.What changes are included in this PR?
What is the testing strategy for this PR?
cargo test -p datafusion-sqllogictest --test sqllogictests -- joinscargo test -p datafusion-physical-expr(1,685 passed, 2 ignored; 13 doctests passed)RUST_BACKTRACE=1 cargo test -p datafusion(passed)RUST_BACKTRACE=1 cargo test -p datafusion-cli(passed)cargo clippy --all-targets --all-features -- -D warnings(passed)cargo +1.99.0 fmt --all -- --checkandgit diff --check(passed)This contribution was prepared with AI assistance.
Are there any user-facing changes?
This fixes incorrect query results for affected outer joins. There are no API changes.