planner: fix null-safe equality partition pruning#68425
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes an invalid-parameter panic in partition range pruning when the null-safe equality operator ( ChangesNull-safe equality partition pruning
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #68425 +/- ##
================================================
- Coverage 77.2764% 75.7244% -1.5521%
================================================
Files 2010 2008 -2
Lines 555481 563986 +8505
================================================
- Hits 429256 427075 -2181
- Misses 125305 136752 +11447
+ Partials 920 159 -761
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
What problem does this PR solve?
Issue Number: close #65991
Problem Summary:
Queries can panic with
invalid input parameternulleqwhen partition pruning sees a constant-left null-safe equality predicate such as1 <=> partition_col. The failing issue query derives that shape from a correlated tupleINpredicate over partitioned tables.What changed and how does it work?
opposite()now treatsast.NullEQas symmetric when partition pruning normalizes constant-left predicates into column-left predicates. This keeps<=>unchanged after operand flipping instead of falling through to the panic path.The regression test covers both
PARTITION BY RANGEandPARTITION BY RANGE COLUMNS, including non-NULL and NULL constants.Check List
Tests
Manual test:
Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Tests