rdblue commented on code in PR #5913:
URL: https://github.com/apache/iceberg/pull/5913#discussion_r989560757
##########
core/src/main/java/org/apache/iceberg/InheritableMetadataFactory.java:
##########
@@ -59,12 +59,22 @@ public <F extends ContentFile<F>> ManifestEntry<F>
apply(ManifestEntry<F> manife
BaseFile<?> file = (BaseFile<?>) manifestEntry.file();
file.setSpecId(specId);
}
+
if (manifestEntry.snapshotId() == null) {
manifestEntry.setSnapshotId(snapshotId);
}
+
+ // in v1 tables, the data sequence number is not persisted and can be
safely defaulted to 0
+ // in v2 tables, the data sequence number should be inherited iff the
entry status is ADDED
+ if (manifestEntry.dataSequenceNumber() == null
+ && (sequenceNumber == 0 || manifestEntry.status() ==
ManifestEntry.Status.ADDED)) {
+ manifestEntry.setDataSequenceNumber(sequenceNumber);
Review Comment:
Looks good to me.
--
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]