hive - bug

CREATE TABLE part_test (key STRING, value STRING) PARTITIONED BY (ds STRING) STORED AS SEQUENCEFILE;

desc extended part_test;

ALTER TABLE part_test ADD PARTITION(ds='1');
ALTER TABLE part_test ADD PARTITION(ds='2');
show partitions part_test;

desc extended part_test;
desc extended part_test partition(ds=1);
desc extended part_test partition(ds=2);


alter table part_test partition(ds=2) set fileformat rcfile;
desc extended part_test;
desc extended part_test partition(ds=1);
desc extended part_test partition(ds=2);

// 不好的地方,改变一个不存在的partition的fileformat,会改变table的fileformat. 需要修改代码。
alter table part_test partition(ds=3) set fileformat rcfile;
desc extended part_test;
desc extended part_test partition(ds=1);
desc extended part_test partition(ds=2);


https://issues.apache.org/jira/browse/HIVE-1642
https://issues.apache.org/jira/browse/HIVE-1408
https://issues.apache.org/jira/browse/HIVE-1534

你可能感兴趣的:(hive)