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

Zhihua Deng resolved HIVE-27682.
--------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Fix has been merged to master. Thank you [~hemanth619] for the review!

> AlterTableAlterPartitionOperation cannot change the column type if the table 
> has default partition
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-27682
>                 URL: https://issues.apache.org/jira/browse/HIVE-27682
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> Steps to repro the case :
> {noformat}
> create database pt;
> create table pt.alterdynamic_part_table(intcol string) partitioned by 
> (partcol1 string, partcol2 string);
> insert into table pt.alterdynamic_part_table partition(partcol1, partcol2) 
> select NULL, '2', NULL;
> alter table pt.alterdynamic_part_table partition column (partcol2 
> int);{noformat}
> Exception is thrown:
> {noformat}
> org.apache.hadoop.hive.ql.metadata.HiveException: Exception while checking 
> type conversion of existing partition values to FieldSchema(name:partcol2, 
> type:int, comment:null) : Exception while converting string to int for value 
> : NULL
>     at 
> org.apache.hadoop.hive.ql.ddl.table.partition.alter.AlterTableAlterPartitionOperation.check(AlterTableAlterPartitionOperation.java:69)
>     at 
> org.apache.hadoop.hive.ql.ddl.table.partition.alter.AlterTableAlterPartitionOperation.execute(AlterTableAlterPartitionOperation.java:55){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to