Skip to content

Add OR ALTER support for CREATE VIEW #1818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

aharpervc
Copy link
Contributor

Reference: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql

This PR adds an or_alter field to the CreateView struct, which is false by default but true for CREATE OR ALTER. This syntax is used by SQL Server, but implemented here generically. There is a verified_stmt test added to the existing "create view" test, to assert this field round trips as expected.

@aharpervc aharpervc marked this pull request as ready for review April 21, 2025 19:12
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @aharpervc!
cc @alamb

@iffyio iffyio merged commit 87d1907 into apache:main Apr 23, 2025
9 checks passed
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.

2 participants