Fang-Yu Rao created IMPALA-15756:
------------------------------------

             Summary: Column in the USING clause in a join could not be resolved
                 Key: IMPALA-15756
                 URL: https://issues.apache.org/jira/browse/IMPALA-15756
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
            Reporter: Fang-Yu Rao


We found that in some cases the classic/original Impala frontend could not 
resolve columns in the USING clause in a join. The issue could be reproduced in 
the following.
{code:sql}
create database test_db_01;
create table test_db_01.a (id int, k int);
create table test_db_01.b (k int);

with c as (select 1 as id)
select c.id from test_db_01.a join test_db_01.b on a.k = b.k join c using(id);
{code}

We would encounter the following error.
{code}
[localhost:21050] default> with c as (select 1 as id)
select c.id from test_db_01.a join test_db_01.b on a.k = b.k join c using(id);
Query: with c as (select 1 as id)
select c.id from test_db_01.a join test_db_01.b on a.k = b.k join c using(id)
Query submitted at: 2026-11-06 15:18:07 (Coordinator: http://fangyu:25000)
2026-11-06 15:18:07 [Exception]  ERROR: Query b64d8455edf01199:e85f8e5b00000000 
failed:
AnalysisException: unknown column id for alias test_db_01.b (in " INNER JOIN c 
USING (id)")

{code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to