stevenzwu commented on code in PR #15006:
URL: https://github.com/apache/iceberg/pull/15006#discussion_r2756343984
##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -1060,9 +1062,32 @@ private List<ManifestFile> newDeleteFilesAsManifests() {
}
if (cachedNewDeleteManifests.isEmpty()) {
+ Map<String, List<DeleteFile>> duplicateDVs = Maps.newHashMap();
+ List<DeleteFile> validDVs = Lists.newArrayList();
+ for (Map.Entry<String, List<DeleteFile>> entry :
dvsByReferencedFile.entrySet()) {
Review Comment:
it might be a little simpler if we just do one iteration over the
`dvsByReferencedFile` map that transforms `Map<String, List<DeleteFile>>` to
`Map<String, DeleteFile>`. It is a **stateful** transform function that can
create a new puffin file to host the merged DVs. I guess this essentially
repurpose DVUtil to a stateful map function.
--
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]