Sivaraj Kumar created HIVE-24910:
------------------------------------

             Summary: Alter table on a parquet table is failing
                 Key: HIVE-24910
                 URL: https://issues.apache.org/jira/browse/HIVE-24910
             Project: Hive
          Issue Type: Bug
         Environment: Prod
            Reporter: Sivaraj Kumar


I'm not able to add a new column to my Athena table (Hope EMR/HIVE will have 
similar issue). The only issue I figured by doing the same with different types 
of table definition and partition format is, date column as the very first 
column. I'm getting an error

FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask. Parquet does not support date. See 
HIVE-6384

Here are my sample DDLs. Please let me know how to make this work.

This is not working, since the first column is date CREATE EXTERNAL TABLE 
{{fact_direct}}( draw_date date, {{draw_id}} bigint, {{transaction_timestamp}} 
timestamp, {{game_id}} bigint ) PARTITIONED BY ( {{transaction_date}} string) 
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
LOCATION 's3://xxxx/fact_direct';

Here is the alter command alter table fact_direct add columns(new_column 
varchar(10));

This is working, just excluded the date column from the above DDL: CREATE 
EXTERNAL TABLE {{fact_direct}}( {{draw_id}} bigint, {{transaction_timestamp}} 
timestamp, {{game_id}} bigint ) PARTITIONED BY ( {{transaction_date}} string) 
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
LOCATION 's3://xxxx/fact_direct';

Here is the alter command alter table fact_direct add columns(new_column 
varchar(10));



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to