Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E64EC100E0 for ; Tue, 17 Sep 2013 07:27:55 +0000 (UTC) Received: (qmail 24486 invoked by uid 500); 17 Sep 2013 07:27:54 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 24386 invoked by uid 500); 17 Sep 2013 07:27:53 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 24059 invoked by uid 500); 17 Sep 2013 07:27:52 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 24037 invoked by uid 99); 17 Sep 2013 07:27:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 07:27:52 +0000 Date: Tue, 17 Sep 2013 07:27:52 +0000 (UTC) From: "Sean Busbey (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5211) ALTER TABLE does not change the type of column for a table with AVRO data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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