[
https://issues.apache.org/jira/browse/HIVE-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltan Matyus resolved HIVE-2301.
---------------------------------
Resolution: Done
> Throw error when attempting to create a column with the same name as a
> partition column
> ---------------------------------------------------------------------------------------
>
> Key: HIVE-2301
> URL: https://issues.apache.org/jira/browse/HIVE-2301
> Project: Hive
> Issue Type: Bug
> Components: CLI
> Affects Versions: 0.8.0
> Reporter: Paul Yang
> Assignee: Zoltan Matyus
> Priority: Minor
>
> If an alter table is run to rename a column to the same name as a partition
> column, the alter will succeed. However, subsequent operations on that table
> will fail.
> {code}
> hive> create table tmp_pyang_test (key string) partitioned by (ds string);
> OK
> Time taken: 4.773 seconds
> hive> alter table tmp_pyang_test replace columns (ds string);
> OK
> Time taken: 1.254 seconds
> hive> describe tmp_pyang_test;
> FAILED: Error in metadata: Partition column name ds conflicts with table
> columns.
> FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.DDLTask
> hive>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)