rdblue commented on a change in pull request #3104:
URL: https://github.com/apache/iceberg/pull/3104#discussion_r781460786



##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -725,6 +764,49 @@ private static SortOrder freshSortOrder(int orderId, 
Schema schema, SortOrder so
     return builder.build();
   }
 
+  private Map<String, SnapshotRef> validateAndCompleteRefs(Map<String, 
SnapshotRef> inputRefs) {
+    for (SnapshotRef ref : inputRefs.values()) {
+      Preconditions.checkArgument(snapshotsById.containsKey(ref.snapshotId()) 
|| ref.snapshotId() == -1,
+          "Snapshot reference %s does not exist in the existing snapshots 
list", ref);

Review comment:
       Do we also want to validate that only `main` can be `-1`?




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