-
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,executor: support global index for IndexScan and IndexLookUpReader #19821
planner,executor: support global index for IndexScan and IndexLookUpReader #19821
Conversation
/run-check-title |
Please follow PR Title Format:
|
go mod edit -replace github.com/pingcap/parser= github.com/ldeng-ustc/parser@global_index_executor |
PTAL @qw4990 @lzmhhh123 |
LGTM |
PTAL @lzmhhh123 |
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.
LGTM
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@ldeng-ustc merge failed. |
/merge |
/run-all-tests |
@ldeng-ustc merge failed. |
What problem does this PR solve?
Support global index in IndexScan and IndexLookUpReader
Proposal: #18982
This PR is based on parser #1010.
Related PR: tikv #8603.
What is changed and how it works?
How it Works:
IndexScan for global index is just like IndexScan for non-parition table index, so we just skip
buildPartitionTable
when index is global.For supporting double read, add an extra paritionID column when first read. In parition tables, locate a row not only need a handle, but also a partitionID, so we add
PartitionHandle
, which combine a paritionID and a normal handle. Then, usePartitionHanle
to correctly sort and setKvRanges
in tableReader. Because meta data of all paritions of a parition table is same, so we can use a single tableReader to read all rows in different partitions we need.Check List
Tests
Release note