Repository navigation
Conversation
Collaborator
Author
|
@flinkbot run azure |
Author
|
@flinkbot run azure |
junmuz
force-pushed
the
FLINK-41363-add-column
branch
from
November 11, 2026 10:58
729fd3b to
5943e41
Compare
junmuz
force-pushed
the
FLINK-41363-add-column
branch
from
November 11, 2026 17:58
5943e41 to
542ef64
Compare
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.
…a ALTER TABLE
What is the purpose of the change
Adds
IF NOT EXISTSsupport when adding columns withALTER TABLE, allowing schema setup statements to be repeated before anINSERTwithout failing on existing columns.Existing columns retain their definitions and positions. For column lists, each existing column is skipped independently while missing columns are added.
Brief change log
ADD COLUMN IF NOT EXISTS,ADD IF NOT EXISTS column_definition, andADD IF NOT EXISTS (column_definition, ...).ALTER TABLE IF EXISTS.Verifying this change
This change adds the following test coverage:
FlinkSqlParserImplTest: supported syntax, unparsing, quoted identifiers, column definitions, and rejection of unsupported guarded lists.SqlAlterTableAddColumnConverterTest: adding missing columns, preserving existing columns, mixed column lists, no-op behavior, and validation failures.CatalogITCase: repeatedCREATE TABLE IF NOT EXISTSand conditional column additions across separate table environments sharing a catalog, followed by successful inserts.table.q: repeated conditional additions and verification that existing column types, comments, and positions are preserved.Tests were not run while preparing this PR description, and I will be relying on the CI tests. Manually verified that ALTER TABLE commands work as expected.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-6)