Skip to content
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

Compatibility: support ALTER TABLE... PARTITION BY #9682

Closed
Tracked by #8604
shlomi-noach opened this issue Feb 14, 2022 · 1 comment · Fixed by #9683
Closed
Tracked by #8604

Compatibility: support ALTER TABLE... PARTITION BY #9682

shlomi-noach opened this issue Feb 14, 2022 · 1 comment · Fixed by #9683
Assignees
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)

Comments

@shlomi-noach
Copy link
Contributor

Our parser today does not support ALTER TABLE ... PARTITION BY. It does support statements like ALTER TABLE ... ADD PARTITION or ALTER TABLE.... REORGANIZE PARTITION etc. But is missing on the "completely repartition like so" option.

Example query:

ALTER TABLE t PARTITION BY HASH(id) PARTITIONS 4;

MySQL's ALTER TABLE lets you repartition everything according to a completely new scheme. Basically, it uses the same partitioning syntax from CREATE TABLE. We already have this supported in CREATE TABLE in the form of PartitionOption

All we need to do to close this issue is to support PartitionOption inside AlterTable

Self assigning

@shlomi-noach
Copy link
Contributor Author

Related: #8604

There is at least another outstanding partitioning limitation to the parser; in #8604 partitioning is marked as complete but I believe that's a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant