-
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, store/copr: allow limit on range partitioned table #41342
base: master
Are you sure you want to change the base?
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
031ef90
to
599b7fd
Compare
599b7fd
to
16ed0e0
Compare
/retest |
It's not unstable, the test need to be fixed due to this PR's update. |
Signed-off-by: you06 <you1474600@gmail.com>
2748ea8
to
7f4fe22
Compare
@you06: 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. |
@@ -2080,8 +2080,8 @@ func (ds *DataSource) convertToTableScan(prop *property.PhysicalProperty, candid | |||
task = copTask | |||
if candidate.isMatchProp { | |||
copTask.keepOrder = true | |||
// TableScan on partition table can't keep order. | |||
if ds.tableInfo.GetPartitionInfo() != nil { | |||
// TableScan on partition table can't keep order, except range partition. |
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.
What if the partition key is not the row id key?
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.
table schema:
primary key a
partition by b
query:
order by b limit
order by a limit
@you06: 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. |
Signed-off-by: you06 you1474600@gmail.com
What problem does this PR solve?
Issue Number: ref #41480
Problem Summary:
Currently we when there is
order by xx limit n
statement over a partitioned table, and thexx
is the partitioned PK, we still use a TopN plan which read across all related partitions, but there is a chance to stop earlier when the partition type is range.What is changed and how it works?
Use a limit plan when the table is range partitioned.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.