-
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
executor: ALTER TABLE COMPACT support partition #36173
Conversation
[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. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/abbb12aa94ffe857441cba93b9f00c2aed94bf80 |
f0189a5
to
fa484b0
Compare
09f4529
to
306ae38
Compare
/rebuild |
306ae38
to
01d6bc7
Compare
01d6bc7
to
abbb12a
Compare
abbb12a
to
236e6d0
Compare
d8ed129
to
a6b7d21
Compare
Signed-off-by: hehechen <awd123456sss@gmail.com>
a6b7d21
to
6042915
Compare
/cc @breezewish |
I'm not sure if |
https://dev.mysql.com/doc/refman/8.0/en/partitioning-maintenance.html |
Signed-off-by: hehechen <awd123456sss@gmail.com>
7e0ee0e
to
7e3c8fa
Compare
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
Signed-off-by: hehechen <awd123456sss@gmail.com>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: c06dec4
|
TiDB MergeCI notify🔴 Bad News! [1] CI still failing after this pr merged.
|
Signed-off-by: hehechen awd123456sss@gmail.com
What problem does this PR solve?
Issue Number: close #36175 ref pingcap/tiflash#5315
Problem Summary:
In #34741 and #36368,
ALTER TABLE [name] COMPACT
andALTER TABLE [name] COMPACT TIFLASH REPLICA
syntax has been added. Deal with partition tables, allowing more fine-grained control. The syntax can be extended as:ALTER TABLE [name] COMPACT PARTITION [PartitionNameList]
andALTER TABLE [name] COMPACT PARTITION [PartitionNameList] TIFLASH REPLICA
What is changed and how it works?
Parser:
Add new syntaxes:
ALTER TABLE [name] COMPACT PARTITION [PartitionNameList]
ALTER TABLE [name] COMPACT PARTITION [PartitionNameList] TIFLASH REPLICA.
Executor:
In compact_table executor, find the partition name in table info, and send compact request to TiFlash for these partitions.
Check List
Tests
PARTITION
and noPARTITION
to compact a table without partition respectively.Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.