Fokko commented on code in PR #9996:
URL: https://github.com/apache/iceberg/pull/9996#discussion_r1849083781


##########
core/src/main/java/org/apache/iceberg/ManifestFilterManager.java:
##########
@@ -443,38 +443,36 @@ private ManifestFile filterManifestWithDeletedFiles(
                               && entry.isLive()
                               && entry.dataSequenceNumber() > 0
                               && entry.dataSequenceNumber() < 
minSequenceNumber);
-                  if (entry.status() != ManifestEntry.Status.DELETED) {
-                    if (markedForDelete || evaluator.rowsMightMatch(file)) {
-                      boolean allRowsMatch = markedForDelete || 
evaluator.rowsMustMatch(file);
-                      ValidationException.check(
-                          allRowsMatch
-                              || isDelete, // ignore delete files where some 
records may not match
-                          // the expression
-                          "Cannot delete file where some, but not all, rows 
match filter %s: %s",
-                          this.deleteExpression,
-                          file.location());
-
-                      if (allRowsMatch) {
-                        writer.delete(entry);
-
-                        if (deletedFiles.contains(file)) {
-                          LOG.warn(
-                              "Deleting a duplicate path from manifest {}: {}",
-                              manifest.path(),
-                              file.location());
-                          duplicateDeleteCount += 1;
-                        } else {
-                          // only add the file to deletes if it is a new delete
-                          // this keeps the snapshot summary accurate for 
non-duplicate data
-                          deletedFiles.add(file.copyWithoutStats());
-                        }
+                  if (markedForDelete || evaluator.rowsMightMatch(file)) {
+                    boolean allRowsMatch = markedForDelete || 
evaluator.rowsMustMatch(file);
+                    ValidationException.check(
+                        allRowsMatch
+                            || isDelete, // ignore delete files where some 
records may not match
+                        // the expression
+                        "Cannot delete file where some, but not all, rows 
match filter %s: %s",
+                        this.deleteExpression,
+                        file.location());
+
+                    if (allRowsMatch) {
+                      writer.delete(entry);
+
+                      if (deletedFiles.contains(file)) {
+                        LOG.warn(
+                            "Deleting a duplicate path from manifest {}: {}",
+                            manifest.path(),
+                            file.location());
+                        duplicateDeleteCount += 1;
                       } else {
-                        writer.existing(entry);
+                        // only add the file to deletes if it is a new delete
+                        // this keeps the snapshot summary accurate for 
non-duplicate data
+                        deletedFiles.add(file.copyWithoutStats());
                       }
-
                     } else {
                       writer.existing(entry);
                     }
+
+                  } else {
+                    writer.existing(entry);
                   }
                 });
       } finally {

Review Comment:
   We could also use try-with-resources here, but I don't want to clutter up 
the diff.



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