RussellSpitzer commented on code in PR #12861: URL: https://github.com/apache/iceberg/pull/12861#discussion_r2074117005
########## core/src/main/java/org/apache/iceberg/BaseRowDelta.java: ########## @@ -132,15 +144,44 @@ protected void validate(TableMetadata base, Snapshot parent) { parent); } + if (validateDeletes) { + failMissingDeletePaths(); + } + if (validateNewDataFiles) { validateAddedDataFiles(base, startingSnapshotId, conflictDetectionFilter, parent); } if (validateNewDeleteFiles) { + // validate that explicitly deleted files have not had added deletes + if (!deletedDataFiles.isEmpty()) { + validateNoNewDeletesForDataFiles( + base, startingSnapshotId, conflictDetectionFilter, deletedDataFiles, parent); + } + + // validate that previous deletes do not conflict with added deletes validateNoNewDeleteFiles(base, startingSnapshotId, conflictDetectionFilter, parent); } + validateNoSimultaneousForDeletedFiles(); + validateAddedDVs(base, startingSnapshotId, conflictDetectionFilter, parent); } } + + /** Validates that the data files removed in this commit do not overlap with delete files added */ Review Comment: This was really just a sanity check. Forbids a commit where you attempt to add a position delete/equality delete for a file which you are also completely removing. I can remove this but I am assuming that an implementation is doing something wrong if it attempts to delete FILEA and also add a DV for FILEA at the same time. -- 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