Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
emr
Description
Lets say, there is partitioned table like
Step1:
>> CREATE TABLE srcpart (key STRING, value STRING)
PARTITIONED BY (ds STRING, hr STRING)
STORED AS TEXTFILE;
Step2:
Alter the fileformat for a specific available partition.
>> alter table srcpart partition(ds="2008-04-08", hr="12") set fileformat orc;
Step3:
Describe the partition.
>> desc formatted srcpart partition(ds="2008-04-08", hr="12")
.............
- Storage Information
SerDe Library: org.apache.hadoop.hive.ql.io.orc.OrcSerde
InputFormat: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
OutputFormat: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
Compressed: No
Num Buckets: -1
Bucket Columns: []
Sort Columns: []
Storage Desc Params:
serialization.format 1
Step4:
Write the data to this partition using insert overwrite.
>>insert overwrite table srcpart partition(ds="2008-04-08",hr="12") select key, value from .......
Step5:
Describe the partition again.
>> desc formatted srcpart partition(ds="2008-04-08", hr="12")
.................
- Storage Information
SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
InputFormat: org.apache.hadoop.mapred.TextInputFormat
OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
Compressed: No
Num Buckets: -1
Bucket Columns: []
Sort Columns: []
Storage Desc Params:
serialization.format 1
The fileformat of the partition is converted back to the table's original fileformat. It should have retained and written the data in the modified fileformat.