Repository navigation
Conversation
Contributor
|
Please resolve many conflicts. |
Signed-off-by: minleejae <mmj9808@gmail.com>
minleejae
force-pushed
the
fix/alter-renderer-dispatch-20261011
branch
from
October 11, 2026 14:14
3efd3d6 to
94f413d
Compare
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 ALTER deparsing follow the same active body as
toString(), including when callers mutate an action or retain metadata from a previous operation. A drop action changed toALTER COLUMN id RESTART, with a leftoverSET DEFAULTentry, currently renders the identity action throughtoString()but renders the unrelated default throughStatementDeParser.Current design (As-is)
getColumnDefaults()infers an active default action from base-class fields, while subclasses choose their own rendering paths. The deparser also treats any stored column-definition list as active. These independent decisions let inactive metadata replace the actual statement body and send unrelated expressions to a custom visitor.Target design (To-be)
usesColumnActionBody().hasActiveColumnDefinitions()and haveAlterDeParseruse that decision instead of mere list presence.The usage guide documents the distinction between stored and active metadata. Custom subclasses that replace
appendBody()should override the matching dispatch hooks when changing these rules. This change does not add SQL syntax or replace the index/constraint model.CI follow-up
The macOS Maven job failed before the traversal benchmark started: parsing its generated 30,000-CTE SQL exceeded
CCJSqlParserUtil's parser timeout (JSQLParserException: Time out occurred, caused byTimeoutException). The fixture now builds the equivalent AST directly. It retains 30,000 CTE aliases, 30,000 table references and the two-second traversal assertion; parser and traversal timeout limits are unchanged.Validation
After the CI follow-up: all 107
TablesNamesFinderTestcases pass locally in both Gradle and Maven on Java 17, including the unchanged-size traversal performance check. The updated heada7ea55ddpasses grammar checks, Gradle and Maven on Ubuntu/Windows/macOS, and Codacy. Deployment-only jobs are skipped as expected for a PR.Java 17 Gradle
spotlessApply checkafter rebasing ontomaster(066f581e): 10,061 tests, 10,036 passed, 25 skipped, zero failures/errors. Grammar, formatting, Checkstyle, PMD, SpotBugs and coverage checks pass.21 new regression cases cover the identity/default mismatch, PostgreSQL/MySQL editable defaults, custom expression visitors, TYPE USING, common-tail rendering, nine dedicated action bodies and competing base-body metadata. The focused set of 54 new/existing rendering/default tests passes.
Additional cached PMD default-complexity and field-placement comparisons introduce no new method violations.
Applying both remaining follow-ups (Fix ALTER deparser dispatch for inactive column metadata #2770 and Separate ALTER key definitions from column drop targets #2771) together on current master produces exactly the same Git tree as the previously tested eight-PR integration. That integration passed the complete Java 17 Gradle
check: 10,079 tests, 10,054 passed, 25 skipped, zero failures/errors.Replayed 882 previously DB-validated DDL fixtures against that integrated build: 875 pass with unchanged SQL output and reparsing; the same seven existing parse gaps remain. Nine statements intentionally expose raw
ColumnOptionnodes in the AST node-type set. No other result differences except generated grammar source locations; no fresh database execution.This is an independent
master-based follow-up (066f581e), related to the editable identity API in #2768.