Karan Datta created IMPALA-8953:
-----------------------------------

             Summary: Tables and Databases sharing same name can cause query 
failures if table is not readable by Impala
                 Key: IMPALA-8953
                 URL: https://issues.apache.org/jira/browse/IMPALA-8953
             Project: IMPALA
          Issue Type: Improvement
            Reporter: Karan Datta


Please see below scenario:


1) CREATE DATABASE a;
2) Create tables "a.b" and "default.a". However, create "default.a" in a format 
which Impala cannot read. For example: Open CSV Serde from Hive.
3) Connect to Impala and execute below statements -
a) INVALIDATE METADATA;
b) use default;
c) select * from a.b;

Above query will lead to following exception:

CAUSED BY: TableLoadingException: Unrecognized table type for table: default.a

If the database of query "select * from a.b;" is changed to any other database 
then, the query executes successfully. For example:
use test1 or use test;
select * from a.b;

Also, if the table "default.a" is created with a format that Impala can 
read/load, query "select * from a.b" executes successfully.

Above scenario occurs as Impala can refer to the collection column b in table a 
in database default, or it can refer to table b in database a. As Impala cannot 
disambiguate between the two cases unless it knows that there is a collection 
column b be in default.a, it loads metadata of table "default.a" while 
executing query on table "a.b". If the table "default.a" exists and is not 
readable by Impala, any query executed on tables available in database "a" from 
default database will fail. For a better UX, we should improve/change this 
behavior.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to