You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Noémi Pap-Takács (Jira)" <ji...@apache.org> on 2026/10/19 13:14:00 UTC

[jira] [Updated] (IMPALA-13767) Common table expression (CTE) in a WITH clause should not be treated as a table by TableVisitor for the Calcite planner

     [ https://issues.apache.org/jira/browse/IMPALA-13767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noémi Pap-Takács updated IMPALA-13767:
--------------------------------------
    Fix Version/s: Impala 5.0.0

> Common table expression (CTE) in a WITH clause should not be treated as a table by TableVisitor for the Calcite planner
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-13767
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13767
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Frontend
>            Reporter: Fang-Yu Rao
>            Assignee: Fang-Yu Rao
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> Currently for the Calcite planner in Impala, a temporary table associated with a WITH clause is treated as a table by {{TableVisitor}} in [CalciteMetadataHandler.java|https://github.com/apache/impala/blob/master/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java].
>  
> For instance, after the execution of "{{{}parsedNode.accept(tableVisitor){}}}" in CalciteMetadataHandler.java, '{{{}tableVisitor.tableNames_{}}}' evaluates to a {{HashSet}} consisting of the table names "{{{}default.t{}}}" and "{{{}functional.alltypestiny{}}}" for the following query. It would be better if "{{{}default.t{}}}" is not considered as the name of a table involved in the query when we are visiting the {{SqlNode}}.
> {code:java}
> with t as (select * from functional.alltypestiny) select * from t;
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org