Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Bug
-
None
-
None
-
None
Description
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:
create table test (id int);
insert into test values (1);
alter table test set fileformat parquet;
insert into test values (2);
select * from test;
Will result in:
java.lang.RuntimeException: .../000000_0 is not a Parquet file (too small) (state=,code=0)