You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2026/06/01 19:19:00 UTC
[jira] [Created] (CALCITE-7575) Parser can not parse unparsed polymorphic table functions with several table args
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)