rdblue commented on code in PR #16689:
URL: https://github.com/apache/iceberg/pull/16689#discussion_r3375982882
##########
core/src/main/java/org/apache/iceberg/TrackingBuilder.java:
##########
@@ -143,6 +145,17 @@ Tracking build() {
replacedPositions);
}
+ /**
+ * Promotes an EXISTING entry to MODIFIED on mutation. Fresh-add builders
(status = ADDED) are
+ * preserved — covers the same-commit append + DV attach case without a
special branch.
+ */
+ private void promoteToModified() {
+ if (status == EntryStatus.EXISTING) {
Review Comment:
I don't understand this check. If the status is `ADDED`, would we not update
to `MODIFIED`? I know that `ADDED` will never get here, but that's half the
point: this assumes status checks elsewhere. Why split status handling in
multiple places? This also implies that it's perfectly fine to call this on a
`DELETED` entry, which I also do not expect.
The code here is not worth the confusion over why this logic is here. This
is two lines (and `snapshotId` should not be modified).
--
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]