You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2023/01/09 22:36:05 UTC

[GitHub] [hive] saihemanth-cloudera commented on a diff in pull request #3920: HIVE-26911: Renaming a translated external table with a specified loc…

saihemanth-cloudera commented on code in PR #3920:
URL: https://github.com/apache/hive/pull/3920#discussion_r1065170132


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -270,8 +270,12 @@ public void alterTable(RawStore msdb, Warehouse wh, String catName, String dbnam
 
             // get new location
             assert(isReplicated == HMSHandler.isDbReplicationTarget(db));
-            if (renamedTranslatedToExternalTable) {
+            if (renamedTranslatedToExternalTable && !tableInSpecifiedLoc) {
               destPath = new Path(newt.getSd().getLocation());

Review Comment:
   @dengzhhu653 - if you explicitly specify a table location for old table b: as `file:${system:test.tmp.dir}/tmp.db/b` then it fails with the same exception. Only if you don't specify a location the query would pass



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org