You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Paul Yang (JIRA)" <ji...@apache.org> on 2011/07/22 20:10:58 UTC

[jira] [Created] (HIVE-2301) Throw error when attempting to create a column with the same name as a partition column

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
            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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2301) Throw error when attempting to create a column with the same name as a partition column

Posted by "Chinna Rao Lalam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168296#comment-13168296 ] 

Chinna Rao Lalam commented on HIVE-2301:
----------------------------------------

This is now working in trunk. we can close this issue

{quote}
hive> create table tmp_pyang_test (key string) partitioned by (ds string);
OK
Time taken: 0.663 seconds
hive> alter table tmp_pyang_test replace columns (ds string);
Invalid table columns : Partition column name ds conflicts with table columns.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
{quote}
                
> 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
>            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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira