planner: fix null-reject proof for WEEK and YEARWEEK#68817
Conversation
|
@winoros I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
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 (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR stops classifying WEEK and YEARWEEK as fully NULL-preserving, adds targeted proof logic that treats only the date argument as NULL-preserving, and expands tests and registry checks to validate the corrected null-rejection behavior. ChangesWEEK/YEARWEEK null-handling fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 docstrings
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) 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 |
43a335f to
9ee6612
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #68817 +/- ##
================================================
- Coverage 76.3106% 75.3535% -0.9572%
================================================
Files 2041 2023 -18
Lines 563469 567153 +3684
================================================
- Hits 429987 427370 -2617
- Misses 132566 139752 +7186
+ Partials 916 31 -885
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: hawkingrei, 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 |
[LGTM Timeline notifier]Timeline:
|
|
@winoros: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #68816
Problem Summary:
WEEK(date, mode)andYEARWEEK(date, mode)were classified as whole-function NULL-preserving builtins for null-reject proof. This is unsafe because TiDB/MySQL treats aNULLmode argument as mode0, so predicates such asWEEK('2024-01-08', nullable_mode) >= 0are not null-rejecting onnullable_mode.What changed and how does it work?
WEEKandYEARWEEKfrom the whole-function NULL-preserving builtin table.CAST.Check List
Tests
Unit test:
Other checks:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
Bug Fixes
Tests