hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vaibhav (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-20288) DROP TABLE throws any error/warning while an attempt is made to drop a table which does not exist .
Date Wed, 01 Aug 2018 11:50:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-20288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

vaibhav updated HIVE-20288:
---------------------------
    Description: 
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.log :

2018-08-01 09:36:07,575 ERROR [main]: metadata.Hive (Hive.java:getTable(1215)) - Table tabledoesnotexist
not found: temp.tabledoesnotexist table not found

========

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'

 

 

 

 

  was:
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'

 

 

 

 


> 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.log :
> 2018-08-01 09:36:07,575 ERROR [main]: metadata.Hive (Hive.java:getTable(1215)) - Table
tabledoesnotexist not found: temp.tabledoesnotexist table not found
> ========
> 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)

Mime
View raw message