Julian Keppel created HIVE-11093:
------------------------------------
Summary: ALTER TABLE for avro backed tables
Key: HIVE-11093
URL: https://issues.apache.org/jira/browse/HIVE-11093
Project: Hive
Issue Type: Bug
Components: Hive
Affects Versions: 1.1.0
Environment: Cloudera CDH 5.4.0
Reporter: Julian Keppel
I use Hive Version 1.1.0 in Cloudera CDH 5.4.0.
I have created an external table:
CREATE EXTERNAL TABLE *tableA*
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED AS
INPUTFORMAT
'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
LOCATION 'location'
TBLPROPERTIES ('avro.schema.url'=schema_location');
Now I wanted to create a managed table with exactly the same columns except
of one additional column (a generated hash key). The only idea I had was to
create the table with: CREATE TABLE *tableB* LIKE *tableA*;
And then add the additional column with: ALTER TABLE *tableB* ADD COLUMNS
(new_column INT);
The statements run without any errors or exceptions (even in the log files
under /var/log/hive) but the new column doesn't appear.
With a CSV table it worked properly. So I think this has to do with the fact
that its a avro backed table. But according to this ticket
(https://issues.apache.org/jira/browse/HIVE-7446) the feature was added in
version 0.14.0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)