hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aihua Xu <...@cloudera.com>
Subject Re: Review Request 53110: HIVE-14909: Preserve the "parent location" of the table when an "alter table <table> rename to <newname>" is submitted (the case when the db location is not specified and the Hive defult db is outside the same encrypted zone)
Date Wed, 26 Oct 2016 19:04:43 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53110/#review153924
-----------------------------------------------------------




metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java (line 166)
<https://reviews.apache.org/r/53110/#comment223430>

    Can we implement the logic like: if a location is not specified, then a default location
will be given. When we rename the table, we will preserve the location even if it's a default
location, but just changing the table name to the new one?
    
    Seems that's more natural, but I guess we have a reason for that? Any problems with that?


- Aihua Xu


On Oct. 26, 2016, 1:20 a.m., Chaoyu Tang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53110/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2016, 1:20 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-14909
>     https://issues.apache.org/jira/browse/HIVE-14909
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Since Hive supports the DDL like:
> create table foo (key int) location 'path_to_location'
> to create a managed table by specifying its location rather than that under its database.
So table rename should respect this specified location, and not change its location or move
its data. Its location should be change using a different command 'alter table .. set location
...' instead.
> 
> 
> Diffs
> -----
> 
>   hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestSemanticAnalysis.java
ce4ef75 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 7b84595 
>   ql/src/test/queries/clientpositive/encryption_move_tbl.q a25d955 
>   ql/src/test/results/clientpositive/encrypted/encryption_move_tbl.q.out 910ce25 
> 
> Diff: https://reviews.apache.org/r/53110/diff/
> 
> 
> Testing
> -------
> 
> Unit tests
> Manaual tests
> 
> 
> Thanks,
> 
> Chaoyu Tang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message