Skip to content

Expose shared column rename access for table and view actions - #2744

Merged
manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:refactor/ddl-rename-actions-20261001
Oct 11, 2026
Merged

manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:refactor/ddl-rename-actions-20261001

Conversation

@minleejae

@minleejae minleejae commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Let consumers inspect and edit table, view and materialized-view column renames through one API.

Current design (As-is)

Table column renames store their source and target in columnOldName and columnName; relation actions use columnName and newName. Consumers must distinguish these representations. Master already provides the separate ColumnDefaultAction API.

Target design (To-be)

Expose active renames through AlterExpression.getColumnRename() and ColumnRenameAction, with editable sourceName and targetName accessors. Delegate to existing AST fields so edits through either API remain visible through the other. Preserve identifier quoting and the optional COLUMN keyword; unrelated operations return null.

RelationAlterAction implements both ColumnRenameAction and the existing ColumnDefaultAction, retaining each operation's filtered lookup. Preserve parser result classes and existing public signatures; grammar and dialect acceptance are unchanged. Add a usage example.

Validation

After merging master at 40ed289b, the full Java 17 Gradle check passed: 9,852 tests total, 9,827 passed, 25 skipped, zero failures. All 16 rename tests and 17 column-default tests passed. Coverage includes common/legacy accessor edits, quoted names, inactive operation state, rendering and reparsing. Grammar choice-conflict checks, Spotless, Checkstyle, PMD, SpotBugs and coverage verification passed.

GitHub CI at 5cc52bb1 also passes: Codacy, grammar conflicts, and Gradle/Maven checks on Linux, macOS and Windows.

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
@manticore-projects

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit 9b7ab32 into JSQLParser:master Oct 11, 2026
10 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you!

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