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

Tim Armstrong commented on IMPALA-8918:
---------------------------------------

I guess this behaviour was probably changed by 
IMPALA-8851. I think unfortunately some workflows might depend on the fact that 
the drop command is tried on the HMS regardless of whether the table exists on 
the Impala, so we should consider if we can preserve the old behaviour

> Drop-Table-If-Exists can't drop unloaded table
> ----------------------------------------------
>
>                 Key: IMPALA-8918
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8918
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.3.0
>            Reporter: Quanlong Huang
>            Priority: Critical
>
> "unloaded" in the title means Impala does know the table name.
> If a table is created in Hive and haven't been run INVALIDATE METADATA in 
> Impala, Drop-Table-If-Exists on it will always return results as "Table does 
> not exist."
> Repro:
> {code:java}
> $ beeline -u "jdbc:hive2://localhost:11050/default;" -e "create table abcd (i 
> int)"
> $ bin/impala-shell.sh
> [localhost:21000] default> drop table if exists abcd;
> Query: drop table if exists abcd
> +-----------------------+
> | summary               |
> +-----------------------+
> | Table does not exist. |
> +-----------------------+
> Fetched 1 row(s) in 0.04s
> [localhost:21000] default> invalidate metadata abcd;
> Query: invalidate metadata abcd
> Query submitted at: 2019-09-04 06:03:19 (Coordinator: 
> http://quanlong-OptiPlex-7060:25000)
> Query progress can be monitored at: 
> http://quanlong-OptiPlex-7060:25000/query_plan?query_id=c34120fc1891edae:38a6bf0700000000
> Fetched 0 row(s) in 0.05s
> [localhost:21000] default> drop table if exists abcd;                         
>                                                                               
>                                                   
> Query: drop table if exists abcd
> +-------------------------+
> | summary                 |
> +-------------------------+
> | Table has been dropped. |
> +-------------------------+
> Fetched 1 row(s) in 3.91s {code}
> Drop-Table-If-Exists should be able to drop such kind of a table.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to