-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(hogql): always provide an alias when printing out clickhouse #19342
Conversation
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.
Are there any edge cases around having two things alias to the same name?
E.g. select properties, person.properties from events
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.
Code looks alright 👀
No. In this case only the second one would get the explicit alias. |
Problem
This query failed with PoE off:
with
Field person_id not found on query with alias source
Changes
The field is on a joined table in a subquery. Just accessing it with its id is not enough.
Let's fix this by making aliases explicit in ClickHouse. This avoids surprises.
How did you test this code?
Updated a lot of tests. Converted some older SQL comparison tests into snapshot tests.