Skip to content

Keep ALTER partition accessors backed by structured state - #2739

Open
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:refactor/ddl-partition-state-20261001
Open

minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:refactor/ddl-partition-state-20261001

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

After parsing PARTITION BY, legacy setters previously changed snapshots that rendering ignored. Delegate type, expression, columns and definitions to TablePartitioning, expose mutable column-name views, preserve quoted identifiers, and clear stale data when replacing or removing the structured clause.

Existing parser result classes and public method signatures are retained. This change does not expand grammar or dialect acceptance. setPartitioning(null) clears the structured clause instead of restoring stale snapshots. The legacy name-list getter is mutable; assigned names become structured Column nodes.

Validation: All 9 initial regression tests fail on the base. 314 related tests pass; the quoted-identifier follow-up passes 35 tests. Spotless, Checkstyle, PMD and SpotBugs passed for the initial change.

Combined validation with the six related DDL refactoring branches: Gradle check passes (9,395 tests: 9,370 passed, 25 skipped, zero failures). Of 840 DDL cases accepted by MySQL 8.4.11/PostgreSQL 18.6, 835 parse and produce toString/deparser SQL that also executes successfully; the remaining 5 already fail to parse on base 87e8814. Final SQL outputs match the DB-replayed outputs exactly. These combined checks supplement the branch-specific tests above.

Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
@minleejae
minleejae marked this pull request as ready for review October 1, 2026 15:21

This branch has not been deployed

No deployments
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.

1 participant