Skip to content

feat: support MySQL ALTER TABLE ... PARTITION BY syntax #2210

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

minleejae
Copy link
Contributor

Description

This PR adds support for the MySQL ALTER TABLE ... PARTITION BY syntax in the JSQLParser library. The implementation includes parsing and deparsing of PARTITION BY clauses, handling both partition expressions and partition columns.

Changes

  • Updated AlterExpression class to handle partition expressions and partition columns.
  • Modified toString method in AlterExpression to correctly format PARTITION BY clauses.
  • Added test cases in AlterTest to verify the correct parsing and deparsing of ALTER TABLE ... PARTITION BY statements.

@manticore-projects
Copy link
Contributor

That's a really nice addition, thank you for your contribution!

@manticore-projects manticore-projects merged commit d60c762 into JSQLParser:master Apr 2, 2025
3 of 4 checks passed
@minleejae minleejae deleted the feat/partition branch April 2, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants