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 "Fang-Yu Rao (Jira)" <ji...@apache.org> on 2025/04/28 18:59:00 UTC
[jira] [Commented] (IMPALA-14007) Calcite planner could not correctly validate queries involving the same table name
[ https://issues.apache.org/jira/browse/IMPALA-14007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947914#comment-17947914 ]
Fang-Yu Rao commented on IMPALA-14007:
--------------------------------------
cc: [~amansinha] [~scarlin]
> Calcite planner could not correctly validate queries involving the same table name
> ----------------------------------------------------------------------------------
>
> Key: IMPALA-14007
> URL: https://issues.apache.org/jira/browse/IMPALA-14007
> Project: IMPALA
> Issue Type: Bug
> Reporter: Fang-Yu Rao
> Assignee: Fang-Yu Rao
> Priority: Major
>
> We found that the Calcite planner could not correctly validate queries involving the same table name for 2 tables in different databases, whereas this case could be supported by the classic Impala frontend. The issue could be reproduced as follows in impala-shell if we start the Impala cluster after "{{{}export USE_CALCITE_PLANNER=true{}}}" on the command line.
> - {{create database test_db_01;}}
> - {{create database test_db_02;}}
> - {{create table test_db_01.test_tbl_01 (id int);}}
> - {{create table test_db_02.test_tbl_01 (id int);}}
> - {{set use_calcite_planner=1;}}
> - {{select test_db_01.test_tbl_01.id, test_db_02.test_tbl_01.id from test_db_01.test_tbl_01, test_db_02.test_tbl_01;}}
>
> We will get the following exception after the SELECT query above.
> {code:java}
> [localhost:21050] default> select test_db_01.test_tbl_01.id, test_db_02.test_tbl_01.id from test_db_01.test_tbl_01, test_db_02.test_tbl_01;
> Query: select test_db_01.test_tbl_01.id, test_db_02.test_tbl_01.id from test_db_01.test_tbl_01, test_db_02.test_tbl_01
> Query submitted at: 2025-04-28 11:48:18 (Coordinator: http://fangyu-upstream-dev.gce.cloudera.com:25000)
> 2025-04-28 11:48:25 [Exception] ERROR: Query 2e4d548884a9a1aa:595f9b6d00000000 failed:
> AnalysisException: From line 1, column 90 to line 1, column 111: Duplicate relation name 'TEST_TBL_01' in FROM clause
> CAUSED BY: SqlValidatorException: Duplicate relation name 'TEST_TBL_01' in FROM clause
> {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