You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kevin Wilfong (Created) (JIRA)" <ji...@apache.org> on 2012/03/15 22:56:38 UTC

[jira] [Created] (HIVE-2874) Renaming external partition changes location

Renaming external partition changes location
--------------------------------------------

                 Key: HIVE-2874
                 URL: https://issues.apache.org/jira/browse/HIVE-2874
             Project: Hive
          Issue Type: Bug
            Reporter: Kevin Wilfong


Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.

E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1

Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');

Will change the location of the partition to /.../ex_table/part=2



--
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

        

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo commented on HIVE-2874:
------------------------------------

@Namit: Thanks for your comments. I updated the patch at:
https://reviews.facebook.net/D5751
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Namit Jain updated HIVE-2874:
-----------------------------

    Status: Open  (was: Patch Available)

comments on phabrocator
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Attachment: HIVE-2874.2.patch.txt
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Namit Jain commented on HIVE-2874:
----------------------------------

+1
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt, HIVE-2874.3.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Namit Jain commented on HIVE-2874:
----------------------------------

You are right. The location should not change by a rename in external's table partition.
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt, HIVE-2874.3.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo reassigned HIVE-2874:
----------------------------------

    Assignee: Zhenxiao Luo
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Attachment: HIVE-2874.3.patch.txt
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt, HIVE-2874.3.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo commented on HIVE-2874:
------------------------------------

@Namit: My understanding in the old patch is incorrect. So, if an external table's partition is renamed, its location should not change, but I could do select/where using the new partition name. Correct me if my understanding is still wrong.

I also updated my patch at:
https://reviews.facebook.net/D5751
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo commented on HIVE-2874:
------------------------------------

Review Request submitted at:
https://reviews.facebook.net/D5751
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Namit Jain updated HIVE-2874:
-----------------------------

      Resolution: Fixed
    Hadoop Flags: Reviewed
          Status: Resolved  (was: Patch Available)

Committed. Thanks Zhenxiao
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt, HIVE-2874.3.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Attachment: HIVE-2874.1.patch.txt
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo commented on HIVE-2874:
------------------------------------

if it is an EXTERNAL_TABLE, the table's location is in StorageDescriptor, the new patch shares the same parent path as the old path.

If it is a MANAGED_TABLE, the table's location could be get from Warehouse.
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Namit Jain updated HIVE-2874:
-----------------------------

    Status: Open  (was: Patch Available)

comments on phabricator
                
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HIVE-2874) Renaming external partition changes location

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

Zhenxiao Luo updated HIVE-2874:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Renaming external partition changes location
> --------------------------------------------
>
>                 Key: HIVE-2874
>                 URL: https://issues.apache.org/jira/browse/HIVE-2874
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2874.1.patch.txt, HIVE-2874.2.patch.txt, HIVE-2874.3.patch.txt
>
>
> Renaming an external partition will change the location of that partition to the default location of a managed partition with the same name.
> E.g. If ex_table is external and has partition part=1 with location /.../managed_table/part=1
> Calling ALTER TABLE ex_table PARTITION (part = '1') RENAME TO PARTITION (part = '2');
> Will change the location of the partition to /.../ex_table/part=2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira