[
https://issues.apache.org/jira/browse/HIVE-20288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565179#comment-16565179
]
vaibhav commented on HIVE-20288:
--------------------------------
0: jdbc:hive2://v-u-2:10000> drop table xyz;
No rows affected (0.491 seconds)
HiveServer2.logs :
2018-08-01 11:37:19,265 ERROR [HiveServer2-Background-Pool: Thread-61028]:
metadata.Hive (Hive.java:getTable(1215)) - Table xyz not found: temp.xyz table
not found
2018-08-01 11:37:19,266 INFO [HiveServer2-Background-Pool: Thread-61028]:
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(860)) - 14: get_table :
db=temp tbl=xyz
> DROP TABLE throws any error/warning while an attempt is made to drop a table
> which does not exist .
> ---------------------------------------------------------------------------------------------------
>
> Key: HIVE-20288
> URL: https://issues.apache.org/jira/browse/HIVE-20288
> Project: Hive
> Issue Type: Bug
> Affects Versions: 1.2.1, 2.1.1
> Reporter: vaibhav
> Priority: Major
>
> When I do DROP TABLE ( for a table which really does not exist in the
> database) in hive .It really don't throw any warning/error and just show OK
> (the same message as the table is present and was dropped ).
> =========
> hive> show tables;
> OK
> Time taken: 0.921 seconds
> hive>
> > drop table tabledoesnotexist;
> OK
> Time taken: 0.355 seconds
> ========
> hive> show tables;
> OK
> Time taken: 2.096 seconds
> hive> drop table if exists tabledoesnotexist;
> OK
> Time taken: 0.145 seconds
> ========
> hive> create table test(id int);
> OK
> Time taken: 1.258 seconds
> hive> drop table test;
> OK
> Time taken: 0.561 seconds
>
>
> In general, the database should return an Error if the table is not present.
> Eg : MySQL:
> mysql> drop table test;
> [Code: 1051, SQL State: 42S02] Unknown table 'test'
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)