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 12:41:37 UTC

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

dengzhhu653 commented on code in PR #3920:
URL: https://github.com/apache/hive/pull/3920#discussion_r1064598255


##########
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:
   What happen if the path for the old table `b` is `file:${system:test.tmp.dir}/tmp.db/b`?  Does it throw the same exception?



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