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


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1230,6 +1265,22 @@ public Builder addSnapshot(Snapshot snapshot) {
       snapshotsById.put(snapshot.snapshotId(), snapshot);
       changes.add(new MetadataUpdate.AddSnapshot(snapshot));
 
+      if (rowLineage) {
+        ValidationException.check(
+            snapshot.firstRowId() >= nextRowId,
+            "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:
   minor: I don't think we use backticks anywhere else in error messages, so 
maybe we could just use `'` instead to get `'last-used-id'`? Same for the other 
error messages in this PR



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