Hive 1.1.0 Alter table partition type from int to string

后端 未结 2 913
猫巷女王i
猫巷女王i 2021-01-05 06:39

I have a table which has a partition of type int but which I want to convert to string. However, I can\'t figure out how to do this.

The table description is:

<
2条回答
  •  失恋的感觉
    2021-01-05 07:22

    A bit of digging revealed that there was a hive JIRA to have a command exactly for updating partition column data type (https://issues.apache.org/jira/browse/HIVE-3672)

    alter table {table_name} partition column ({column_name} {column_type});
    

    According to JIRA the command was implemented, but it's apparent that it was never documented on Hive Wiki.

    I used it on my Hive 0.14 system and it worked as expected.

提交回复
热议问题