Guosmilesmile commented on code in PR #13998:
URL: https://github.com/apache/iceberg/pull/13998#discussion_r2344492833


##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/ListFileSystemFiles.java:
##########
@@ -108,15 +116,22 @@ public void processElement(Trigger trigger, Context ctx, 
Collector<String> out)
             (SupportsPrefixOperations) io, location, specs, predicate, 
out::collect);
       } else {
         Predicate<FileStatus> predicate = file -> file.getModificationTime() < 
olderThanTimestamp;
+        List<String> remainingSubDirs = Lists.newArrayList();
         FileSystemWalker.listDirRecursivelyWithHadoop(
             location,
             specs,
             predicate,
             configuration,
-            Integer.MAX_VALUE,
-            Integer.MAX_VALUE,
-            dir -> {},
+            maxListingDepth,
+            maxListingDirectSubDirs,
+            remainingSubDirs::add,

Review Comment:
   Yes, we can emit the result immediately. Fix it. Thanks for pointing it out. 



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