Sergey Nuyanzin created CALCITE-7575:
----------------------------------------

             Summary: Parser can not parse unparsed polymorphic table functions 
with several table args
                 Key: CALCITE-7575
                 URL: https://issues.apache.org/jira/browse/CALCITE-7575
             Project: Calcite
          Issue Type: Sub-task
          Components: core
            Reporter: Sergey Nuyanzin
            Assignee: Sergey Nuyanzin


probably the reason is that in parser there is a separate Arg0 and other args

example of query
{code:sql}

SELECT * FROM TABLE(SIMILARLITY(
        TABLE emp PARTITION BY deptno,
        TABLE emp PARTITION BY deptno))
{code} 

is rewritten to 
{code:sql}

SELECT * FROM TABLE(SIMILARLITY(
        (SELECT `EMP`.`EMPNO`, `EMP`.`ENAME`, `EMP`.`JOB`, `EMP`.`MGR`, 
`EMP`.`HIREDATE`, `EMP`.`SAL`, `EMP`.`COMM`, `EMP`.`DEPTNO`, `EMP`.`SLACKER` 
FROM `CATALOG`.`SALES`.`EMP` AS `EMP`) PARTITION BY `DEPTNO`,
         (SELECT `EMP`.`EMPNO`, `EMP`.`ENAME`, `EMP`.`JOB`, `EMP`.`MGR`, 
`EMP`.`HIREDATE`, `EMP`.`SAL`, `EMP`.`COMM`, `EMP`.`DEPTNO`, `EMP`.`SLACKER` 
FROM `CATALOG`.`SALES`.`EMP` AS `EMP`) PARTITION BY `DEPTNO`))
{code}
and parser fails to parse it



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

Reply via email to