You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Prasad Chakka (JIRA)" <ji...@apache.org> on 2009/06/23 02:04:07 UTC

[jira] Created: (HIVE-571) add ability to rename a column.

add ability to rename a column.
-------------------------------

                 Key: HIVE-571
                 URL: https://issues.apache.org/jira/browse/HIVE-571
             Project: Hadoop Hive
          Issue Type: Improvement
          Components: Metastore
    Affects Versions: 0.4.0
            Reporter: Prasad Chakka
             Fix For: 0.4.0


currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793886#action_12793886 ] 

Namit Jain commented on HIVE-571:
---------------------------------

+1

will commit if the tests pass

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22-2.patch, hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793787#action_12793787 ] 

Namit Jain commented on HIVE-571:
---------------------------------

1. Can you add negative tests :
  a. the old column does not exist.
  b. the new column already exist



> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-571) add ability to rename a column.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

He Yongqiang updated HIVE-571:
------------------------------

    Attachment: hive-571-2009-12-22.patch

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730833#action_12730833 ] 

He Yongqiang commented on HIVE-571:
-----------------------------------

I would like to let the syntax looks like:
alter table table_name RENAME col_1, col_2 ... (new_col_1 data_type [COMMENT col_comment], new_col_2 data_type [COMMENT col_comment], ....)


> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>             Fix For: 0.4.0
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793792#action_12793792 ] 

Namit Jain commented on HIVE-571:
---------------------------------

I agree - we should support changing datatype also.

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731284#action_12731284 ] 

He Yongqiang commented on HIVE-571:
-----------------------------------

so the syntax should be: 
alter table change [column] old_col_name new_col_name

@Namit, why we can not change the datatype?

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>             Fix For: 0.4.0
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793873#action_12793873 ] 

He Yongqiang commented on HIVE-571:
-----------------------------------

no problem. Will update wiki after it is committed.

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22-2.patch, hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793790#action_12793790 ] 

Prasad Chakka commented on HIVE-571:
------------------------------------

if we can support changing of the column type in other alter table statements (REPLACE COLUMNS), why not support it here? also why not exactly support the mysql syntax

{code}
CHANGE [COLUMN] old_col_name new_col_name column_definition
        [FIRST|AFTER col_name]
{code}

atleast we should support changing the comment.


> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793865#action_12793865 ] 

Prasad Chakka commented on HIVE-571:
------------------------------------

Yongqing, can you add the change to wiki after this is committed? when you do that please mention that the underlying data is untouched and it is the responsibility of the user to change the data to fit the new schema.

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22-2.patch, hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730966#action_12730966 ] 

Namit Jain commented on HIVE-571:
---------------------------------

Also, currently we can only support changing the name/comment of the column - not the datatype.

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>             Fix For: 0.4.0
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-571) add ability to rename a column.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

He Yongqiang updated HIVE-571:
------------------------------

    Attachment: hive-571-2009-12-22-2.patch

Integrates Prasad's comment. Thanks, Prasad.

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22-2.patch, hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain reassigned HIVE-571:
-------------------------------

    Assignee: He Yongqiang

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-571) add ability to rename a column.

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730938#action_12730938 ] 

Prasad Chakka commented on HIVE-571:
------------------------------------

we should follow MySQL syntax as rest of HiveQL tries to follow MySQL. the above syntax is different from that of MySQL's.

http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>             Fix For: 0.4.0
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HIVE-571) add ability to rename a column.

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain resolved HIVE-571.
-----------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Committed. Thanks Yongqiang

> add ability to rename a column.
> -------------------------------
>
>                 Key: HIVE-571
>                 URL: https://issues.apache.org/jira/browse/HIVE-571
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.4.0
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>             Fix For: 0.5.0
>
>         Attachments: hive-571-2009-12-22-2.patch, hive-571-2009-12-22.patch
>
>
> currently only way to rename a column is to use 'REPLACE COLUMNS' which can be cumbersome if the table has lots of columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.