gaoyunhaii commented on a change in pull request #12485:
URL: https://github.com/apache/flink/pull/12485#discussion_r436443457



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/filesystem/PartitionLoader.java
##########
@@ -113,12 +113,7 @@ private void renameFiles(List<Path> srcDirs, Path destDir) 
throws Exception {
                                        for (FileStatus srcFile : srcFiles) {
                                                Path srcPath = 
srcFile.getPath();
                                                Path destPath = new 
Path(destDir, srcPath.getName());
-                                               int count = 1;
-                                               while (!fs.rename(srcPath, 
destPath)) {
-                                                       String name = 
srcPath.getName() + "_copy_" + count;
-                                                       destPath = new 
Path(destDir, name);
-                                                       count++;
-                                               }
+                                               fs.rename(srcPath, destPath);

Review comment:
       Here seems inconsistent with this method's comment: rename does not 
delete the dest path if it exists on HDFS. Instead, it will keep the srcPath 
and dest Path unchanged.




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

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


Reply via email to