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

Xuefu Zhang updated HIVE-6042:
------------------------------

    Description: 
step1: create table 
{code}
             drop table if exists t;
             create table t(a int)PARTITIONED BY (city_ string);
{code}
step2: insert data (table dual has only one value: ‘x’)
{code}
   set hive.exec.dynamic.partition.mode=nonstrict; 
   insert into table t partition(city_) select  1,'beijing'  from dual; 
   insert into table t partition(city_) select  2,'shanghai' from dual;


  hive (default)>  select * from t;
1       beijing
2       shanghai
{code}
step3: overwrite table 
{code}
 insert overwrite table t partition(city_) select 3,'beijing' from dual;
 hive (default)>  select * from t;
1       beijing
2       shanghai
{code}
here we can see the partition city_=shanghai  exist yet,But we hope that this 
partition is covered With Dynamic partitioning.

  was:
step1: create table 
             drop table if exists t;
             create table t(a int)PARTITIONED BY (city_ string);
step2: insert data (table dual has only one value: ‘x’)
   set hive.exec.dynamic.partition.mode=nonstrict; 
   insert into table t partition(city_) select  1,'beijing'  from dual; 
   insert into table t partition(city_) select  2,'shanghai' from dual;

  hive (default)>  select * from t;
1       beijing
2       shanghai

step3: overwrite table 
 insert overwrite table t partition(city_) select 3,'beijing' from dual;
 hive (default)>  select * from t;
1       beijing
2       shanghai

here we can see the partition city_=shanghai  exist yet,But we hope that this 
partition is covered With Dynamic partitioning.


> With Dynamic partitioning, All partitions can not be overwrited
> ---------------------------------------------------------------
>
>                 Key: HIVE-6042
>                 URL: https://issues.apache.org/jira/browse/HIVE-6042
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema
>    Affects Versions: 0.12.0
>         Environment: OS: Red Hat Enterprise Linux Server release 6.2
> HDFS: CDH-4.2.1
> MAPRED: CDH-4.2.1-mr1
>            Reporter: ruish li
>         Attachments: HIVE-6042.patch
>
>
> step1: create table 
> {code}
>              drop table if exists t;
>              create table t(a int)PARTITIONED BY (city_ string);
> {code}
> step2: insert data (table dual has only one value: ‘x’)
> {code}
>    set hive.exec.dynamic.partition.mode=nonstrict; 
>    insert into table t partition(city_) select  1,'beijing'  from dual; 
>    insert into table t partition(city_) select  2,'shanghai' from dual;
>   hive (default)>  select * from t;
> 1     beijing
> 2     shanghai
> {code}
> step3: overwrite table 
> {code}
>  insert overwrite table t partition(city_) select 3,'beijing' from dual;
>  hive (default)>  select * from t;
> 1     beijing
> 2     shanghai
> {code}
> here we can see the partition city_=shanghai  exist yet,But we hope that this 
> partition is covered With Dynamic partitioning.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to