nastra commented on code in PR #10007:
URL: https://github.com/apache/iceberg/pull/10007#discussion_r1587260164


##########
core/src/main/java/org/apache/iceberg/FastAppend.java:
##########
@@ -83,9 +85,13 @@ protected Map<String, String> summary() {
 
   @Override
   public FastAppend appendFile(DataFile file) {
-    this.hasNewFiles = true;
-    newFiles.add(file);
-    summaryBuilder.addedFile(spec, file);
+    Preconditions.checkNotNull(file, "Invalid data file: null");
+    if (newFilePaths.add(file.path())) {
+      this.hasNewFiles = true;

Review Comment:
   I agree but I didn't want to do any additional refactorings as part of this 
PR, unless people think I should include it. I can do a follow-up PR to 
refactor this



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to