Skip to content

fix: support comment column names in ALTER TABLE - #2674

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/alter-comment-identifiers
Open

minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/alter-comment-identifiers

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

ALTER TABLE t MODIFY COLUMN comment TEXT previously entered the column-comment grammar branch, while DROP/RENAME/CHANGE could reject the unquoted name. Require the complete COMMENT-literal lookahead and accept comment in the shared ALTER identifier helper.

The existing column-definition/name APIs remain usable for inspecting and editing these actions. Includes a usage example and regressions for ADD/MODIFY/CHANGE/DROP/RENAME, parsed AST mutation, statement deparsing and reparsing, with default and MYSQL configurations.

Validation: full Gradle check on Java 17 (including grammar ambiguity, formatting, Checkstyle, PMD and tests); six valid DDL fixtures executed both before and after parser rendering on MySQL 8.4, with catalog checks for resulting names/types. The grammar fix is shared; no dialect restriction is added to previously supported syntax.

Signed-off-by: minleejae <mmj9808@gmail.com>
@minleejae
minleejae force-pushed the fix/alter-comment-identifiers branch from d0d80a2 to b127d10 Compare September 22, 2026 09:38

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