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 "Tim Armstrong (Jira)" <ji...@apache.org> on 2019/09/19 17:30:00 UTC

[jira] [Commented] (IMPALA-8953) Tables and Databases sharing same name can cause query failures if table is not readable by Impala

    [ https://issues.apache.org/jira/browse/IMPALA-8953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933609#comment-16933609 ] 

Tim Armstrong commented on IMPALA-8953:
---------------------------------------

[~vihangk1] fyi

> 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
>          Components: Catalog
>            Reporter: Karan Datta
>            Priority: Minor
>
> 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-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org