-
Notifications
You must be signed in to change notification settings - Fork 122
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
SNOW-1899126: Fix malformed sql for functions that create internal alias #3136
base: main
Are you sure you want to change the base?
Conversation
[Row('{"end":"1970-01-01 00:00:10.000","start":"1970-01-01 00:00:00.000"}')], | ||
) | ||
Utils.check_answer( | ||
df.select(second(to_timestamp(window(df.ts, "10 seconds")["end"]))), |
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.
For this second example what does the final column name end up being?
@@ -592,6 +613,11 @@ def analyze( | |||
str(expr) | |||
) # pragma: no cover | |||
|
|||
def internal_alias_extractor(self, expr: Expression) -> Expression: |
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.
one last comment: can you add comment on when this function needs to called when analyzing expression to give some context to future us?
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1899126
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
In this PR, we do the following:
Column._alias
to mark aliases created internally by snowpark functions._InternalAlias
to differentiate between internal and user-created aliases.analyze
method to ignore internal aliases when it is not top level expression.