blob: 08e72c408efde53f5bc6b7931bca324ebc4bb0ee [file] [log] [blame]
-- verify that we can update the table properties
CREATE TABLE avro2
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'
TBLPROPERTIES ('avro.schema.literal'='{ "namespace": "org.apache.hive",
"name": "first_schema",
"type": "record",
"fields": [
{ "name":"string1", "type":"string" },
{ "name":"string2", "type":"string" }
] }');
DESCRIBE avro2;
ALTER TABLE avro2 SET TBLPROPERTIES ('avro.schema.literal'='{ "namespace": "org.apache.hive",
"name": "second_schema",
"type": "record",
"fields": [
{ "name":"int1", "type":"int" },
{ "name":"float1", "type":"float" },
{ "name":"double1", "type":"double" }
] }');
DESCRIBE avro2;