-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Alias resolution updates #1281
Alias resolution updates #1281
Conversation
… expression as an alias
… where, since SQL standard prevents aliases in where clause
…ent ambiguity later in qualifyColumns.
…n aliases (which aren't allowed to be used in where clauses)
…ngLevel" to "scopeLevel"
…es and alias names
…pped and temporarily skipping two failing column alias tests.
…olumnOrAliasName error kind.
…ifying column references.
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, only a couple small comments. Thanks for cleaning resolveColumns up, it has been getting increasingly fragile.
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, not perfect but steps in the right direction
This change moves our alias identification and column name qualification code closer to MySQL's behavior. The major changes are:
qualifyExpression
method so that the containing node can be used to switch on different alias visibility rulesThere are still more nuanced edge cases in MySQL's alias behavior that we should continue working on matching (e.g. dolthub/dolt#4535, dolthub/dolt#4537), but this change moves us a nice step forward.
Dolt CI Tests:
Fixes: