-
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
planner: use ordered index with is null predicate #54290
planner: use ordered index with is null predicate #54290
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @michaelmdeng. 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 @michaelmdeng. 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-sigs/prow repository. |
4a71f30
to
9f7b467
Compare
/ok-to-test |
@michaelmdeng: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54290 +/- ##
=================================================
- Coverage 72.9282% 55.5885% -17.3397%
=================================================
Files 1523 1650 +127
Lines 435564 617165 +181601
=================================================
+ Hits 317649 343073 +25424
- Misses 98420 250595 +152175
- Partials 19495 23497 +4002
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@michaelmdeng: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Seems that the effect of this pull is more than we expected. |
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. |
Closing in favor of #54253 |
What problem does this PR solve?
Issue Number: close #54188
Problem Summary: Properly classify columns with null predicates (e.g.
WHERE a IS NULL
) as constant so index selection can take advantage of that to satisfy a sort inas constant so index selection can take advantage of that to satisfy a sort in:
tidb/pkg/planner/core/find_best_task.go
Dupe of #54253 with bazel fixes. @ari-e is out for a bit so attempting to unblock this while he is out.
What changed and how does it work?
Added checks for is null predicate during planning and fill corresponding data structures marking that column as a constant.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.