Replies: 2 comments
-
Not the expert on this topic but: I think this doesn't work because it's looking for the alias on the from clause, which is just T(...), only the final projection list has the aliases, which it won't start evaluating/binding until the from clause is resolved |
Beta Was this translation helpful? Give feedback.
0 replies
-
SELECT
T.COL
, T.ALIAS
, J.ANOTHER
FROM (select COL, SUBSTR(COL, 4) ALIAS FROM TEST) T
LEFT JOIN JOINED AS J
ON T.ALIAS = J.COL; This is proven by the rewrite to this making it work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Support aliases in JOIN condition expression, eg:
Given
Then support the friendly sql:
Which currently errors with
This friendly SQL dialect would avoid having to repeat the column, ie: its nicer than
And also mimics support in other database (eg: Snowflake)
Beta Was this translation helpful? Give feedback.
All reactions