- Notifications
You must be signed in to change notification settings - Fork3.4k
Add support for column aliases and comments in CREATE VIEW statements#27672
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
e6014af tof036403Compareebyhr commentedDec 18, 2025
The logic around duplicate column names handling looks wrong. The below CRATE VIEW should fail: CREATEVIEWduplicate_columns (regionkey, regionkey2)ASSELECT regionkey, regionkeyFROM region;TABLE duplicate_columns;line1:1: View'memory.default.duplicate_columns' is staleorin invalid state: column [regionkey] of typebigint projectedfrom query view at position1 has a different namefrom column [regionkey2] of typebigint storedin view definition |
hqbhoho commentedDec 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ebyhr Thanks for your feedback |
f036403 to73010dcCompare73010dc to4185527Compare
Uh oh!
There was an error while loading.Please reload this page.
Description
Add support for the following syntax:
So we can create view with column alias and comment as follow:
And
SHOW CREATE VIEWwill expose these column alias and comment. The behavior of the existingCREATE VIEWsyntax remains unchanged which will not expose them.Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(X) Release notes are required, with the following suggested text: