nastra commented on code in PR #11302:
URL: https://github.com/apache/iceberg/pull/11302#discussion_r1824130043


##########
core/src/main/java/org/apache/iceberg/FileMetadata.java:
##########
@@ -230,6 +252,15 @@ public DeleteFile build() {
       Preconditions.checkArgument(fileSizeInBytes >= 0, "File size is 
required");
       Preconditions.checkArgument(recordCount >= 0, "Record count is 
required");
 
+      if (format == FileFormat.PUFFIN) {
+        Preconditions.checkArgument(referencedDataFile != null, "Data file ref 
is required for DV");
+        Preconditions.checkArgument(contentOffset != null, "Content offset is 
required for DV");
+        Preconditions.checkArgument(contentSizeInBytes != null, "Content size 
is required for DV");
+      } else {
+        Preconditions.checkArgument(contentOffset == null, "Content offset is 
only for DV");

Review Comment:
   nit: maybe `Content offset must only be set for DVs`? Same for content size



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