Sergey Nuyanzin created CALCITE-7217:
----------------------------------------

             Summary: LATERAL is lost after validation
                 Key: CALCITE-7217
                 URL: https://issues.apache.org/jira/browse/CALCITE-7217
             Project: Calcite
          Issue Type: Bug
            Reporter: Sergey Nuyanzin
            Assignee: Sergey Nuyanzin


It looks like usage of {{SqlValidatorImpl#validate}} for queries with 
{{LATERAL}} leads to it's losing.

simple example 
{code:java}
    sql("select * from emp, lateral table(ramp(emp.deptno)), dept")
        .rewritesTo("SELECT *\n"
              + "FROM `EMP`,\n"
              + "LATERAL TABLE(RAMP(`EMP`.`DEPTNO`)),\n"
              + "`DEPT`");
{code}

this will fail since currently it rewrites it it to
{code:sql}
SELECT *
FROM `EMP`,
TABLE(RAMP(`EMP`.`DEPTNO`)),
`DEPT`
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to