rdblue commented on code in PR #18984:
URL: https://github.com/apache/iceberg/pull/18984#discussion_r4580488128


##########
core/src/main/java/org/apache/iceberg/TrackingBuilder.java:
##########
@@ -107,7 +123,11 @@ TrackingBuilder dvUpdated() {
     Preconditions.checkState(
         deletedPositions == null && replacedPositions == null,
         "Cannot mark DV updated on a manifest entry (deleted/replaced 
positions are set)");
-    this.modifiedSnapshotId = newSnapshotId;
+    if (status != EntryStatus.ADDED) {
+      // files can be added with a DV and are not considered modified
+      this.modifiedSnapshotId = newSnapshotId;

Review Comment:
   Found this case in testing a manifest with no snapshot ID with an appended 
data file that has a DV. The file is appended with a DV so the DV does not 
cause `modified_snapshot_id` to be set. This choice is to ensure consistency 
because inheritance does not set `modified_snapshot_id` if it is null.



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

Reply via email to