-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Planner: Run full partition pruning if convertToPointGet converted keys to SortKey (#59918) #60162
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: Run full partition pruning if convertToPointGet converted keys to SortKey (#59918) #60162
Conversation
…ys to SortKey (pingcap#59918) close pingcap#59827
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-8.5 #60162 +/- ##
================================================
Coverage ? 56.9221%
================================================
Files ? 1769
Lines ? 628031
Branches ? 0
================================================
Hits ? 357489
Misses ? 246420
Partials ? 24122
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: mjonss, qw4990 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 |
This is an automated cherry-pick of #59918
What problem does this PR solve?
Issue Number: close #59827
Problem Summary:
When PointGetPlan is created by
convertToPointGet
, theIndexValues
comes from the Range optimizer, and if any of the LIST/RANGE COLUMNS has a non-binary collation, they conditions values are converted to SortKey, which does not work with the LIST/RANGE COLUMNS partitioning pruning code, since they will unconditionally convert it again to SortKey, which may fail finding a matching partition.NOTE: This only affects PointGet, since BatchPointGet is not supported yet.
What changed and how does it work?
If the IndexValues are already converted, run the normal partition pruning code on the conditions, to find the matching partition.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.