[ 
https://issues.apache.org/jira/browse/HIVE-16720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16019807#comment-16019807
 ] 

Barna Zsombor Klara commented on HIVE-16720:
--------------------------------------------

As a workaround are you fine with cascading your changes to the partitions?
So using  ALTER TABLE test_parquet REPLACE COLUMNS (age int,name string, dept 
string, salary string) *CASCADE*;


> Reorder columns in Hive parquet tables
> --------------------------------------
>
>                 Key: HIVE-16720
>                 URL: https://issues.apache.org/jira/browse/HIVE-16720
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 1.1.0
>            Reporter: Venkata Karthik Penikalapati
>
> We are using hive 1.1.0 have a requirement to reorder columns for one of huge 
> table with 100's of columns for user readability. But when we reorder columns 
> in table its failing with below error.
> hive> desc test_parquet;
> OK
> name                    string
> age                     int
> dept                    string
> salary                  string
> city                    string
> # Partition Information
> # col_name              data_type               comment
> city                    string
> Time taken: 0.053 seconds, Fetched: 10 row(s)
> hive> ALTER TABLE test_parquet REPLACE COLUMNS (age int,name string, dept 
> string, salary string);
> OK
> Time taken: 0.451 seconds
> hive> desc test_parquet;
> OK
> age                     int
> name                    string
> dept                    string
> salary                  string
> city                    string
> # Partition Information
> # col_name              data_type               comment
> city                    string
> Time taken: 0.051 seconds, Fetched: 10 row(s)
> hive> select * from test_parquet;
> OK
> Failed with exception 
> java.io.IOException:java.lang.UnsupportedOperationException: Cannot inspect 
> org.apache.hadoop.io.IntWritable
> Time taken: 0.121 seconds



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to