RussellSpitzer commented on code in PR #15590:
URL: https://github.com/apache/iceberg/pull/15590#discussion_r3034177678


##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -244,11 +254,9 @@ protected void add(DataFile file) {
         file.specId(),
         file.location());
 
-    DataFileSet dataFiles =
-        newDataFilesBySpec.computeIfAbsent(spec.specId(), ignored -> 
DataFileSet.create());
-    if (dataFiles.add(Delegates.suppressFirstRowId(file))) {
+    if (dataFileAccumulator.add(Delegates.suppressFirstRowId(file), 
spec.specId())) {
       addedDataFilesSummary.addedFile(spec, file);
-      hasNewDataFiles = true;
+      hasNewDataFiles = dataFileAccumulator.hasPendingFiles();

Review Comment:
   We have to be a bit careful here. This no longer means hasNewDataFiles. Now 
it means "has unflushed data files"



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