pithecuse527 commented on code in PR #12857:
URL: https://github.com/apache/gravitino/pull/12857#discussion_r3960643279


##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/DefaultGVFSOperations.java:
##########
@@ -124,32 +129,31 @@ public boolean rename(Path srcGvfsPath, Path dstGvfsPath) 
throws IOException {
         srcIdentifier,
         dstIdentifier);
 
-    Path srcActualPath =
-        getActualFilePath(srcGvfsPath, currentLocationName(), 
FilesetDataOperation.RENAME);
+    Pair<FileSystem, Path> src =
+        resolvePath(srcGvfsPath, currentLocationName(), 
FilesetDataOperation.RENAME);
+    // Both paths are in the same fileset, asserted above, so the source's 
filesystem serves both.
     Path dstActualPath =
         getActualFilePath(dstGvfsPath, currentLocationName(), 
FilesetDataOperation.RENAME);
-    FileSystem actualFs = getActualFileSystem(srcGvfsPath, 
currentLocationName());
-    return actualFs.rename(srcActualPath, dstActualPath);
+    return src.getLeft().rename(src.getRight(), dstActualPath);

Review Comment:
   This can be addressed by introducing a new helper method 
(BaseGVFSOperations::resolveRenamePaths) to handle this



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to