rdblue commented on a change in pull request #2293:
URL: https://github.com/apache/iceberg/pull/2293#discussion_r601758199



##########
File path: core/src/main/java/org/apache/iceberg/BaseRewriteFiles.java
##########
@@ -46,6 +51,8 @@ public RewriteFiles rewriteFiles(Set<DataFile> filesToDelete, 
Set<DataFile> file
         "Files to delete cannot be null or empty");
     Preconditions.checkArgument(filesToAdd != null && !filesToAdd.isEmpty(),
         "Files to add can not be null or empty");
+    Preconditions.checkArgument(filesToAdd.stream().allMatch(df -> df.specId() 
== writeSpec().specId()),
+        "Files to add can not have a different spec than the rewrite files 
spec");

Review comment:
       If it isn't a huge number of changes, I'd prefer to fix the tests 
instead of having a hacky work-around. If it is a huge number of changes we can 
look into what to do next. What do you think the effort is to fix them?




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