Skip to content

Fix MODIFY COLUMN parsing when the data type is omitted - #338

Merged
git-hulk merged 1 commit into
AfterShip:masterfrom
git-hulk:codex/fix-modify-column-modifiers
Oct 28, 2026
Merged

git-hulk merged 1 commit into
AfterShip:masterfrom
git-hulk:codex/fix-modify-column-modifiers

Conversation

@git-hulk

@git-hulk git-hulk commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

ALTER TABLE ... MODIFY COLUMN can reject valid modifier-only changes or
store a modifier as the column type. Modifier keywords are treated as
type names when the declaration omits its data type.

For example, CODEC(LZ4) is stored in Column.Type instead of Column.Codec,
while a leading COMMENT causes parsing to fail. This bug predates #337.

Recognize COMMENT, CODEC and TTL as modifiers when the type is omitted,
preserving their AST fields through formatting and reparsing. Preserve
explicit-type parsing and duplicate-modifier rejection, and regenerate
the AST and formatting fixtures for the affected ALTER statements.

Assistant-By GPT-6

@git-hulk git-hulk changed the title Fix modifier-only MODIFY COLUMN parsing Fix MODIFY COLUMN parsing when the data type is omitted Oct 28, 2026
ALTER TABLE ... MODIFY COLUMN can reject valid modifier-only changes or
store a modifier as the column type. Modifier keywords are treated as
type names when the declaration omits its data type.

For example, CODEC(LZ4) is stored in Column.Type instead of Column.Codec,
while a leading COMMENT causes parsing to fail. This bug predates AfterShip#337.

Recognize COMMENT, CODEC and TTL as modifiers when the type is omitted,
preserving their AST fields through formatting and reparsing. Preserve
explicit-type parsing and duplicate-modifier rejection, and regenerate
the AST and formatting fixtures for the affected ALTER statements.

Assistant-By GPT-6
@git-hulk
git-hulk force-pushed the codex/fix-modify-column-modifiers branch from 365e9e2 to dfd4d76 Compare October 28, 2026 03:57
@git-hulk
git-hulk merged commit fce9e2c into AfterShip:master Oct 28, 2026
1 of 2 checks passed
@git-hulk
git-hulk deleted the codex/fix-modify-column-modifiers branch October 28, 2026 03:58
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