aokolnychyi commented on code in PR #4307:
URL: https://github.com/apache/iceberg/pull/4307#discussion_r842192674


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseDeleteOrphanFilesSparkAction.java:
##########
@@ -242,7 +251,8 @@ private static void listDirRecursively(
       }
 
       for (String subDir : subDirs) {
-        listDirRecursively(subDir, predicate, conf, maxDepth - 1, 
maxDirectSubDirs, remainingSubDirs, matchingFiles);
+        listDirRecursively(subDir, predicate, conf, maxDepth - 1, 
maxDirectSubDirs, remainingSubDirs, pathFilter,

Review Comment:
   nit: would it be more readable to put all args on a new line? (with 4 spaces 
for continued indentation) 
   
   ```
   listDirRecursively(
       subDir, predicate, conf, maxDepth - 1, maxDirectSubDirs, 
remainingSubDirs, pathFilter, matchingFiles);
   ```



##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseDeleteOrphanFilesSparkAction.java:
##########
@@ -205,15 +213,16 @@ private String jobDesc() {
     JavaRDD<String> subDirRDD = sparkContext().parallelize(subDirs, 
parallelism);
 
     Broadcast<SerializableConfiguration> conf = 
sparkContext().broadcast(hadoopConf);
-    JavaRDD<String> matchingLeafFileRDD = 
subDirRDD.mapPartitions(listDirsRecursively(conf, olderThanTimestamp));
+    JavaRDD<String> matchingLeafFileRDD =

Review Comment:
   nit: an alternative way of writing this (with 4 spaces for continued 
indentation)
   
   ```
   JavaRDD<String> matchingLeafFileRDD = subDirRDD.mapPartitions(
       listDirsRecursively(conf, olderThanTimestamp, pathFilter)
   );
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to