-
Notifications
You must be signed in to change notification settings - Fork 794
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
fix(snowflake): Allow alias expansion inside JOIN statements #4504
fix(snowflake): Allow alias expansion inside JOIN statements #4504
Conversation
Dammit, missed the formatting checks locally. I'll fix tomorrow, it's 8PM here. |
dialect, | ||
expand_only_groupby=dialect.EXPAND_ALIAS_REFS_EARLY_ONLY_IN_GROUP_BY, |
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.
Passing dialect
here means we can refactor the expand_only_groupby
flag as well.
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.
Doing that actually make some BigQuery tests fail, because this call line 77
if not schema.empty and expand_alias_refs:
_expand_alias_refs(scope, resolver, dialect)
alwasy has expand_only_groupby=False
regardless of the dialect.
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.
Ah, makes sense. Should we refactor this PR then to introduce a similar constant and an arg like expand_joins
?
…king the dialect
…gQuery tests
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.
Probably fine as is.
Co-authored-by: Jo <46752250+georgesittas@users.noreply.github.com>
Fixes #4502