RussellSpitzer commented on code in PR #11948:
URL: https://github.com/apache/iceberg/pull/11948#discussion_r1920826812
##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1230,6 +1265,18 @@ public Builder addSnapshot(Snapshot snapshot) {
snapshotsById.put(snapshot.snapshotId(), snapshot);
changes.add(new MetadataUpdate.AddSnapshot(snapshot));
+ if (rowLineage) {
+ ValidationException.check(
+ snapshot.firstRowId() >= lastRowId,
+ "Cannot add a snapshot whose first-row-id (%s) is less than the
metadata `last-used-id` (%s) because this will end up generating duplicate
row_ids.",
Review Comment:
as jonas noted, I copied the wrong field name. I looked at the design docs
instead of at the spec. It's much clearer with "next-row-id" changing now
--
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]