[
https://issues.apache.org/jira/browse/HIVE-19933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16530654#comment-16530654
]
Alice Fan commented on HIVE-19933:
----------------------------------
Adding additional Information:
By default, hive.exec.drop.ignorenonexistent is set to True. With that, when
users accidentally drop NON-existing table, view, or partition, it will not
throw exception. It will just give an INFO level message like: Returning Hive
schema: Schema(fieldSchemas:null, properties:null). In my opinion, even though
we keep the flag, it should be set to False by default. It seems weird that
Hive provides "INFO : OK" when user drop non-existing table/view/partition.
An drop non-existing table example:
{code:java}
drop view table_not_existing;
INFO : Compiling
command(queryId=hive_20180702175252_8577258a-d68e-4922-b4ba-b317eff9fda4): drop
view table_not_existing
INFO : Semantic Analysis Completed
{color:red}INFO : Returning Hive schema: Schema(fieldSchemas:null,
properties:null){color}
INFO : Completed compiling
command(queryId=hive_20180702175252_8577258a-d68e-4922-b4ba-b317eff9fda4); Time
taken: 0.002 seconds
INFO : Executing
command(queryId=hive_20180702175252_8577258a-d68e-4922-b4ba-b317eff9fda4): drop
view table_not_existing
INFO : Starting task [Stage-0:DDL] in serial mode
INFO : Completed executing
command(queryId=hive_20180702175252_8577258a-d68e-4922-b4ba-b317eff9fda4); Time
taken: 0.003 seconds
INFO : OK
{code}
> ALTER TABLE DROP PARTITION - Partition Not Found
> ------------------------------------------------
>
> Key: HIVE-19933
> URL: https://issues.apache.org/jira/browse/HIVE-19933
> Project: Hive
> Issue Type: Improvement
> Components: HiveServer2
> Affects Versions: 1.2.2
> Reporter: BELUGA BEHR
> Assignee: Alice Fan
> Priority: Major
>
> {code:sql}
> ALTER TABLE web_logsz DROP PARTITION (`date`='xyz')
> -- SemanticException [Error 10001]: Table not found web_logsz
> ALTER TABLE web_logs DROP PARTITION (`date`='xyz')
> -- Success.
> {code}
> There is no 'xyz' partition for the 'date' column. To make this more
> consistent, the query should fail if the user tries to drop a partition that
> does not exist
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)