hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-5211) ALTER TABLE does not change the type of column for a table with AVRO data
Date Tue, 17 Sep 2013 07:27:52 GMT

     [ https://issues.apache.org/jira/browse/HIVE-5211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sean Busbey updated HIVE-5211:
------------------------------

    Labels: avro  (was: )
    
> ALTER TABLE does not change the type of column for a table with AVRO data
> -------------------------------------------------------------------------
>
>                 Key: HIVE-5211
>                 URL: https://issues.apache.org/jira/browse/HIVE-5211
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 0.11.0
>            Reporter: Neha Tomar
>              Labels: avro
>
> 1 >> Created a table in Hive with AVRO data.
> hive> CREATE EXTERNAL TABLE sample 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 '/home/neha/test_data/avrodata'
>     > TBLPROPERTIES ('avro.schema.literal'='{"type": "record","name": "TUPLE_3","fields":
[ { "name": "sample_id","type": [ "null", "int" ],"doc": "autogenerated from Pig Field Schema"}
]}'
>     > );
> OK
> Time taken: 0.16 seconds
> hive> describe sample;
> OK
> sample_id           	int                 	from deserializer   
> Time taken: 0.516 seconds, Fetched: 1 row(s)
> >> Alter the type of column from int to bigint. It displays "OK" as the result
of DDL execution. However, describing the table still shows previous data type.
> hive> alter table sample change sample_id int bigint;
> OK
> Time taken: 0.614 seconds
> hive> describe sample;                               
> OK
> sample_id           	int                 	from deserializer   
> Time taken: 0.4 seconds, Fetched: 1 row(s)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message