Barna Zsombor Klara created HIVE-14601:
------------------------------------------
Summary: Altering table/partition file format with preexisting
data should not be allowed
Key: HIVE-14601
URL: https://issues.apache.org/jira/browse/HIVE-14601
Project: Hive
Issue Type: Bug
Components: Metastore
Reporter: Barna Zsombor Klara
Assignee: Barna Zsombor Klara
Priority: Minor
The file format of a table or a partition can be changed using an alter
statement. However this only affects the metadata, the data in hdfs is not
changed, leading to a table from which you cannot select anymore.
Changing the file format back fixes the issue, but a better approach would be
to prevent the alter to the file format if we have data in the tables.
The issue is reproducible by executing the following commands:
{code}
create table test (id int);
insert into test values (1);
alter table test set fileformat parquet;
insert into test values (2);
select * from test;
{code}
Will result in:
{code}
java.lang.RuntimeException: .../000000_0 is not a Parquet file (too small)
(state=,code=0)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)