Repository navigation
Conversation
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
This was referenced Oct 12, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Make table discovery and metadata validation follow the DDL body actually rendered after AST mutation. For example, adding a column to an ALTER action that still stores an earlier foreign key renders
ADD added INT, but currently table discovery and validation still use the inactive foreign table and key columns.Current design (As-is)
Rendering selects one body, while traversal and metadata validation independently visit stored definitions, defaults and column options. This leaks inactive state into consumers. A CHECK option changed to FOREIGN_OPTIONS can also retain its old constraint node and incorrectly traverse that expression.
Target design (To-be)
getActiveTableDefinition()and the body-selection hooks introduced in Fix ALTER deparser dispatch for inactive column metadata #2770.ColumnOption.Kind, partial legacy constraint headers, identity actions and dedicated primary-key/partition/relation bodies.This refactoring changes consumer behavior after AST mutation; it adds no SQL syntax or database validity rules.
Dependency
Depends on #2770 and includes its commits until that PR is merged. The additional changes can be reviewed in the stack-only comparison. The base remains upstream
masterso this PR is available for upstream review.Validation
spotlessApply check: 10,077 tests, 10,052 passed, 25 skipped, zero failures/errors. Grammar, Checkstyle, PMD, SpotBugs and coverage checks pass.Integration validation
Applied #2770, #2771 and all four follow-ups (#2775–#2778) together on
master(066f581e), resolving overlapping validator edits while preserving their respective behavior. The integrated build passes Java 17 offline GradlespotlessApply check: 10,141 tests, 10,116 passed, 25 skipped, zero failures/errors. The combined ALTER validator has zero findings under the default PMD complexity and field-placement rules.Replayed 882 previously DB-validated MySQL/PostgreSQL DDL fixtures: 875 pass and the same seven existing parse gaps remain. SQL output, reparsing and AST node-type sets match the preceding integration baseline, with no new differences. This replay did not rerun the databases.
The published head passes grammar checks, Gradle and Maven on Ubuntu/Windows/macOS, and Codacy. Deployment-only jobs are skipped as expected for a PR.