Paul Rogers created IMPALA-7953:
-----------------------------------

             Summary: EXPLAIN does not reliably show table aliases
                 Key: IMPALA-7953
                 URL: https://issues.apache.org/jira/browse/IMPALA-7953
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 3.1.0
            Reporter: Paul Rogers


Consider one of the queries in {{PlannerTest.testJoins()}}:

{noformat}
# test that on-clause predicates referring to multiple tuple ids
# get registered as eq join conjuncts
select t1.*
from (select * from functional.alltypestiny) t1
  join (select * from functional.alltypestiny) t2 on (t1.id = t2.id)
  join functional.alltypestiny t3 on (coalesce(t1.id, t2.id) = t3.id)
---- PLAN
PLAN-ROOT SINK
|
04:HASH JOIN [INNER JOIN]
|  hash predicates: coalesce(functional.alltypestiny.id, 
functional.alltypestiny.id) = t3.id
|  runtime filters: RF000 <- t3.id
|
|--02:SCAN HDFS [functional.alltypestiny t3]
|     partitions=4/4 files=4 size=460B
|
03:HASH JOIN [INNER JOIN]
|  hash predicates: functional.alltypestiny.id = functional.alltypestiny.id
|  runtime filters: RF002 <- functional.alltypestiny.id
|
|--01:SCAN HDFS [functional.alltypestiny]
|     partitions=4/4 files=4 size=460B
|     runtime filters: RF000 -> coalesce(functional.alltypestiny.id, 
functional.alltypestiny.id)
|
00:SCAN HDFS [functional.alltypestiny]
   partitions=4/4 files=4 size=460B
   runtime filters: RF000 -> coalesce(functional.alltypestiny.id, 
functional.alltypestiny.id), RF002 -> functional.alltypestiny.id
{noformat}

This query uses self-joins so the table name is not sufficient to explain the 
join decisions. Note that the 02 Scan shows the table alias, {{`t3`}}, for that 
table. But, the 00 and 01 scans do not. As a result, we can't readily tell 
which alias was placed where.

Expected that all scan nodes would show the table alias, if the user provided 
one in the SQL. 




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to