Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
In CALCITE-35, we added support for parenthesized join, for example
SELECT a.x, b.y, c.z FROM a CROSS JOIN (b CROSS JOIN c)
but the SQL standard and PostgreSQL go further, and allow you to add an alias:
SELECT a.x, d.y, d.z FROM a CROSS JOIN (b CROSS JOIN c) AS d
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.)
Attachments
Issue Links
- is related to
-
CALCITE-35 Support parenthesized sub-clause in JOIN
- Closed