You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuangchong (via GitHub)" <gi...@apache.org> on 2023/08/17 07:24:36 UTC

[GitHub] [incubator-paimon] zhuangchong commented on a diff in pull request #1833: [hive] After Flink changed the table name when using hive metastore, the modified table could not be found.

zhuangchong commented on code in PR #1833:
URL: https://github.com/apache/incubator-paimon/pull/1833#discussion_r1296783368


##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -358,9 +358,28 @@ public void renameTable(Identifier fromTable, Identifier toTable, boolean ignore
 
         try {
             checkIdentifierUpperCase(toTable);
+
+            // Rename the file system's table directory. Maintain consistency between tables in the
+            // file system and tables in the Hive Metastore.
+            Path fromPath = getDataTableLocation(fromTable);
+            Path toPath = getDataTableLocation(toTable);
+            try {
+                fileIO.rename(fromPath, toPath);

Review Comment:
   When hive renames a table, it only modifies the metadata and does not modify the value of the location url. Is it necessary to check fromPath and toPath here?
   
   



-- 
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: issues-unsubscribe@paimon.apache.org

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