fix!: make a join's null-padded side nullable - #272
Open
alexandrefimov wants to merge 1 commit into
Open
alexandrefimov wants to merge 1 commit into
alexandrefimov wants to merge 1 commit into
Conversation
infer_rel_schema kept each input's field types as its input declared them, so a required field on the side a join fills with nulls stayed required. LEFT and LEFT_SINGLE pad the right input, RIGHT and RIGHT_SINGLE the left, and OUTER both; inner, semi, anti and mark joins pad nothing, and a side that is already nullable is unchanged. Lateral joins share the derivation. BREAKING CHANGE: Outer and single joins now infer nullable fields on the null-padded side.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughChangesJoin nullability
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
infer_rel_schemakeeps a join's fields as its inputs declare them, so a required field on the side the join fills with nulls stays required. Plans that DuckDB and Isthmus write for an ordinaryLEFT JOINhit this.Make the padded side nullable, per the Join Types in spec v0.99.0:
LEFTandLEFT_SINGLEpad the right input,RIGHTandRIGHT_SINGLEthe left, andOUTERboth. Inner, semi, anti and mark joins pad nothing, a side that is already nullable is unchanged, and lateral joins share the same derivation.Closes #267
BREAKING CHANGE: Outer and single joins now infer nullable fields on the null-padded side. A schema that repeated a required declaration there changes, along with anything derived from it.
Summary by CodeRabbit