-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: open fully order prop push down for partition table's table scan and single index scan #42694
planner: open fully order prop push down for partition table's table scan and single index scan #42694
Conversation
…scan and single index scan
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
64d068a
to
50cb177
Compare
…t-push-down-for-part-table
5517030
to
6857844
Compare
/test mysql-test |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9ca5616
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 8b0b953
|
planner/core/find_best_task.go
Outdated
if ds.tableInfo.GetPartitionInfo() != nil && !is.Index.Global { | ||
is.Columns = append(is.Columns, model.NewExtraPhysTblIDColInfo()) | ||
is.schema.Append(&expression.Column{ | ||
RetType: types.NewFieldType(mysql.TypeLonglong), | ||
UniqueID: ds.ctx.GetSessionVars().AllocPlanColumnID(), | ||
ID: model.ExtraPhysTblID, | ||
}) | ||
} |
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.
Why do we need this? Does this conflict with (*PhysicalIndexScan).initSchema()
?
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.
No, that case is to add a partition id for the global index(It's decoded from the value of the global index). Here we add an extra partition id for non-global index which is decoded from the key instead of the value.
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.
ExtraPhysTblID
will let TiKV return PID in chunk. IndexWorker will use the pid to create a partitionHandle for tableWorker found the handle belongs to which PID and use it to keep order.
} else { | ||
return nil, false | ||
} |
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.
This entire if-else branch can be simplified.
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.
This func will be removed in the next pr since there's fully support for IndexMerge
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 218a241
|
/cherry-pick release-7.1 |
@winoros: new pull request created to branch 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 ti-community-infra/tichi repository. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: ref #26166
Problem Summary:
What is changed and how it works?
We've implemented merge operation between partitions of table scan and single index scan.
So we don't need the former quick path.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.