Julian Hyde created CALCITE-5168:
------------------------------------

             Summary: 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


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.7#820007)

Reply via email to