-
Notifications
You must be signed in to change notification settings - Fork 615
Support column names in more places #98
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
Conversation
Pull Request Test Coverage Report for Build 251
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 251
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I'm inclined to rename Cte::renamed_columns
to columns
and move it before the query
to match the style of this PR once you finish landing your patches.
I'm always unsure if I want to introduce a new struct vs tolerate some duplication in existing structs, so if you have a couple of words to say about why you chose to extract TableAlias
, I'd appreciate it. Note that I don't have anything against it, so just merging is fine as well.
(Ouch, this probably conflicts with the recently landed "WITH options" PR -- the expected order in CREATE VIEW is view_name (columns, list) WITH (options) AS
I think? Having dealt with merge conflicts a lot, I feel your pain - thanks for doing this again! and if I can make this easier, please let me know.)
A `CREATE VIEW` statement may provide names for its columns that override the names of the columns derived from the view's query.
A table alias can specify new names for the columns within the aliased table, in addition to a new name for the table itself.
Sure thing! I thought having a separate struct that could be wrapped in an Option better communicated the set of possibilities. That is, sticking both a struct Table {
table_alias: Option<SQLObjectName>,
column_aliases: Vec<SQLIdentifier>
} indicates that it might be valid to have column aliases without a table alias, when it is not in fact valid. (You can specify a table alias without specifying column aliases, but you cannot specify a column alias without specifying a table alias.)
No problem! The rebase is in, and the conflicts weren't too bad. I really appreciate the speed with which you're moving through these PRs, and I'm happy to do a bit of work to split and reintegrate these changes to make the review easier. In other words, it's the overall rate of divergence that's scary and time-consuming, not the latency of any individual review, and the rate of divergence is very solidly negative at the moment! :) |
Ah, I have not thought of this. Thanks for clarifying - this makes perfect sense to me. |
See individual commits for details.