You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/10 20:54:30 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5235: REST: Create commit catalog handler fix

rdblue commented on code in PR #5235:
URL: https://github.com/apache/iceberg/pull/5235#discussion_r917445448


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -985,10 +1012,12 @@ public Builder addSnapshot(Snapshot snapshot) {
         return this;
       }
 
+      ValidationException.check(!schemas.isEmpty(), "Attempting to add a snapshot before a schema is added");
+      ValidationException.check(!specs.isEmpty(), "Attempting to add a snapshot before a partition spec is added");
+      ValidationException.check(!sortOrders.isEmpty(), "Attempting to add a snapshot before a sort order is added");
       ValidationException.check(!snapshotsById.containsKey(snapshot.snapshotId()),
           "Snapshot already exists for id: %s",
           snapshot.snapshotId());
-

Review Comment:
   Nit: unnecessary change that could cause commit conflicts.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org