-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partition: fix exchange partition validition check for null value #47208
partition: fix exchange partition validition check for null value #47208
Conversation
Hi @jiyfhust. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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/test-infra repository. |
Hi @jiyfhust. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions 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/test-infra repository. |
The "partition by range columns(a, b, c)" case is not fixed by this pr, it seems to be difficult to fix it directly in func buildCheckSQLConditionForRangeColumnsPartition. Mayby we can handle it this way:
|
/ok-to-test |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47208 +/- ##
=================================================
- Coverage 70.5752% 56.3200% -14.2552%
=================================================
Files 1467 1584 +117
Lines 434756 620919 +186163
=================================================
+ Hits 306830 349702 +42872
- Misses 108651 248388 +139737
- Partials 19275 22829 +3554
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I thing you are on the right path, here is an example how an expression can be rewritten. Please feel free to split out the RANGE COLUMS case from this PR. |
ddl/partition.go
Outdated
buf.WriteString(" < %? or ") | ||
buf.WriteString(pi.Expr) | ||
buf.WriteString(" is null") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can there be a case where the expression string also would need to be wrapped into parentheses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say i'm not sure about it. I tested partition by range (id+1)
, the expression is already wapped. And if pi.Expr is null
needed, then pi.Expr < %?
seems also needs. I think we can keep it now before we can make sure some cases as you described exist.
9db794b
to
4631110
Compare
/test unit-test |
@jiyfhust: The specified target(s) for
Use In response to this:
Instructions 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/test-infra repository. |
/retest |
@mjonss I think maybe we can review this pr as present. |
PR needs rebase. Instructions 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/test-infra repository. |
/test check-dev2 |
@jiyfhust: The specified target(s) for
Use In response to this:
Instructions 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/test-infra repository. |
/cc @tiancaiamao |
31991ae
to
083d566
Compare
[LGTM Timeline notifier]Timeline:
|
/label-remove needs-rebase |
/testall |
/retest |
PTAL @ti-chi-bot |
/test all |
/check-issue-triage-complete |
/cc @wjhuang2016 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjonss, tiancaiamao, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/merge |
@tiancaiamao: We have migrated to builtin Please use
Instructions 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #47167
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.