openinx commented on a change in pull request #2216:
URL: https://github.com/apache/iceberg/pull/2216#discussion_r589924035



##########
File path: core/src/main/java/org/apache/iceberg/BaseRewriteFiles.java
##########
@@ -57,4 +57,23 @@ public RewriteFiles rewriteFiles(Set<DataFile> 
filesToDelete, Set<DataFile> file
 
     return this;
   }
+
+  @Override
+  public RewriteFiles rewriteDeletes(Set<DeleteFile> deletesToDelete, 
Set<DeleteFile> deletesToAdd) {
+    Preconditions.checkArgument(deletesToDelete != null && 
!deletesToDelete.isEmpty(),
+        "Files to delete cannot be null or empty");
+    Preconditions.checkArgument(deletesToAdd != null && 
!deletesToAdd.isEmpty(),
+        "Files to add can not be null or empty");
+
+    for (DeleteFile toDelete : deletesToDelete) {
+      delete(toDelete);

Review comment:
       As we will implement the RewriteFiles with delete files, there're more 
delete/data files in `rewriteDeletes` to check. so I'm OK with the current 
assertion in `ReplaceDeleteAction`.




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

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