Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Feb 1, 2024

This backports #9510 to Spark 3.4

`ALTER VIEW <viewName> AS <query>` doesn't allow to preserve column
aliases and column comment when the underlying query is changed, which
can lead to unexpected behavior. For now it's better to use `CREATE OR REPLACE VIEW`
as that is more explicit when the schema of the view is defined with
column aliases/comments.
@github-actions github-actions bot added the spark label Feb 1, 2024
@nastra nastra merged commit daaf5a1 into apache:main Feb 1, 2024
@nastra nastra deleted the spark34-view-alter-not-supported branch February 1, 2024 14:29
devangjhabakh pushed a commit to cdouglas/iceberg that referenced this pull request Apr 22, 2024
…che#9612)

`ALTER VIEW <viewName> AS <query>` doesn't allow to preserve column
aliases and column comment when the underlying query is changed, which
can lead to unexpected behavior. For now it's better to use `CREATE OR REPLACE VIEW`
as that is more explicit when the schema of the view is defined with
column aliases/comments.
@nastra nastra self-assigned this Nov 25, 2024
zhongyujiang pushed a commit to zhongyujiang/iceberg that referenced this pull request Apr 16, 2025
…che#9612)

`ALTER VIEW <viewName> AS <query>` doesn't allow to preserve column
aliases and column comment when the underlying query is changed, which
can lead to unexpected behavior. For now it's better to use `CREATE OR REPLACE VIEW`
as that is more explicit when the schema of the view is defined with
column aliases/comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants