You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Mohit Sikri (JIRA)" <ji...@apache.org> on 2011/02/25 05:36:38 UTC

[jira] Commented: (HIVE-1535) alter partition should throw exception if the specified partition does not exist.

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

Mohit Sikri commented on HIVE-1535:
-----------------------------------

It seems some issue with my mailbox, could not able to send mail, so I'm posting here :-

As tested against latest Hive build and Hadoop 20.1.
 
Kindly provide me the query or the list of queries for which this defect was tested against, as I see no test case in it and when I'm running queries assuming which were being run by He Yongqiang while testing the scenarios, I'm not able to re-produce the scenario.
 
I'm ran queries in below sequence :-
 
1 . set hive.exec.drop.ignorenonexistent=false;
 
2 . create table page_test(view INT, userid INT, page_url STRING) PARTITIONED BY(dt STRING, country STRING) STORED AS A TEXTFILE;
 
3 . LOAD DATA LOCAL INPATH '/home/test.txt' OVERWRITE INTO TABLE page_test PARTITION(dt='10-10-2010',country='US');
 
4 . LOAD DATA LOCAL INPATH '/home/test.txt' OVERWRITE INTO TABLE page_test PARTITION(dt='10-12-2010',country='IN');
 
// This query fails during semantic analysis, since it is invalid partition and don't belong to partition spec of page_test.
 
5 . ALTER TABLE page_test DROP PARTITION(invalid='23-02-2010',notexist='UK'); 
and when I turn ON the property hive.exec.drop.ignorenonexistent, hive is silent and OK.
So far good, and no issues.
 
//However there is another case, in which partition is a valid spec but doesn't exists, as I have only [dt='10-10-2010',country='US'] and [dt='10-12-2010',country='IN']
 
6 . ALTER TABLE page_test DROP PARTITION (dt='23-02-2010',country='UK'); 
but it doesn't results in any exception, I'm getting OK response on console.
 
As per this defect  fix, it should actually fail with console error message 
Partition : [{dt='23-02-2010',country='UK'}] does not exist.
 
I may be wrong, or not aware of enough use cases covering the scope of this defect, kindly help me providing some insights.

> alter partition should throw exception if the specified partition does not exist.
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-1535
>                 URL: https://issues.apache.org/jira/browse/HIVE-1535
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: He Yongqiang
>            Assignee: He Yongqiang
>             Fix For: 0.7.0
>
>         Attachments: hive-1535.1.patch
>
>


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira