Fang-Yu Rao created IMPALA-14007:
------------------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]