amogh-jahagirdar commented on code in PR #17359:
URL: https://github.com/apache/iceberg/pull/17359#discussion_r3653107715
##########
core/src/main/java/org/apache/iceberg/BaseRewriteFiles.java:
##########
@@ -152,5 +152,12 @@ private void validateReplacedAndAddedFiles() {
Preconditions.checkArgument(
deletesDeleteFiles() || !addsDeleteFiles(),
"Delete files to add must be empty because there's no delete file to
be rewritten");
+
+ for (DataFile added : addedDataFiles()) {
+ Preconditions.checkArgument(
+ !replacedDataFiles.contains(added),
+ "Cannot add and delete the same file in the same rewrite: %s",
+ added.location());
+ }
Review Comment:
Yeah the flink test was adding and replacing the same file in the same
commit, but we shouldn't be doing that anyways. Updated the test.
--
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]