Anthony Hsu created HIVE-15400:
----------------------------------

             Summary: EXCHANGE PARTITION should honor partition locations
                 Key: HIVE-15400
                 URL: https://issues.apache.org/jira/browse/HIVE-15400
             Project: Hive
          Issue Type: Bug
            Reporter: Anthony Hsu


Currently, if you add a partition with a custom location, EXCHANGE PARTITION 
will fail with a "File ... does not exist" error:
{noformat}
drop table if exists text_partitioned;
drop table if exists text_partitioned2;

create table text_partitioned (b string) partitioned by (a int) stored as 
textfile;
create table text_partitioned2 (b string) partitioned by (a int) stored as 
textfile;

alter table text_partitioned add partition (a=1) location '/tmp/text/1';

alter table text_partitioned2 exchange partition (a=1) with table 
text_partitioned;
{noformat}

The last command fails with
{code}
FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: 
java.io.FileNotFoundException File 
file:/path/to/warehouse_dir/text_partitioned/a=1 does not exist)
{code}

EXCHANGE PARTITION should honor the location that has been set for the 
partition.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to