[
https://issues.apache.org/jira/browse/CALCITE-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Xu resolved CALCITE-5168.
----------------------------
Fix Version/s: 1.43.0
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/d3a5d8d9e6713c5fd483810e1aa1f38652d2dd8d]
Thank you reported the issue [~julianhyde]
Thank you for the review [~mbudiu]
> Allow AS after parenthesized JOIN
> ---------------------------------
>
> Key: CALCITE-5168
> URL: https://issues.apache.org/jira/browse/CALCITE-5168
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> In CALCITE-35, we added support for parenthesized join, for example
> {code}
> SELECT a.x, b.y, c.z FROM a CROSS JOIN (b CROSS JOIN c)
> {code}
> but the SQL standard and PostgreSQL go further, and allow you to add an alias:
> {code}
> SELECT a.x, d.y, d.z FROM a CROSS JOIN (b CROSS JOIN c) AS d
> {code}
> Note that the second query has "AS d" at the end, and "b.y, c.z" in the
> SELECT clause has changed to "d.y, d.z". The "d" alias obscures the "b" and
> "c" aliases, so "b.y, c.z" would no longer be valid. (If "y" and "z" are not
> unique in "d", the new query would be invalid too.)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)