amogh-jahagirdar commented on code in PR #10229:
URL: https://github.com/apache/iceberg/pull/10229#discussion_r1581081749
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -398,12 +399,14 @@ static List<String> findOrphanFiles(
spark.sparkContext().register(conflicts);
Column joinCond =
actualFileIdentDS.col("path").equalTo(validFileIdentDS.col("path"));
-
- List<String> orphanFiles =
- actualFileIdentDS
- .joinWith(validFileIdentDS, joinCond, "leftouter")
- .mapPartitions(new FindOrphanFiles(prefixMismatchMode, conflicts),
Encoders.STRING())
- .collectAsList();
+ PatriciaTrie<String> files = new PatriciaTrie<>();
+ actualFileIdentDS
+ .joinWith(validFileIdentDS, joinCond, "leftouter")
+ .mapPartitions(new FindOrphanFiles(prefixMismatchMode, conflicts),
Encoders.STRING())
+ .foreach(
+ path -> {
+ files.put(path, null);
Review Comment:
I think there's an API for an iterator on the results, may be worth trying
that and adding to the structure
--
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]