pvary commented on code in PR #12254:
URL: https://github.com/apache/iceberg/pull/12254#discussion_r2033224424
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -335,7 +344,39 @@ private Dataset<String> listedFileDS() {
return spark().createDataset(completeMatchingFileRDD.rdd(),
Encoders.STRING());
}
- private static void listDirRecursively(
+ private static void listDirRecursivelyWithFileIO(
+ SupportsPrefixOperations io,
+ String dir,
+ Predicate<org.apache.iceberg.io.FileInfo> predicate,
+ PathFilter pathFilter,
+ List<String> matchingFiles) {
+ String listPath = dir;
+ if (!dir.endsWith("/")) {
+ listPath = dir + "/";
+ }
+ Iterable<org.apache.iceberg.io.FileInfo> files = io.listPrefix(listPath);
Review Comment:
Maybe only use the listing when the filter is empty?
--
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]