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



##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -949,6 +957,26 @@ public Builder setBranchSnapshot(long snapshotId, String 
branch) {
       return this;
     }
 
+    public Builder createSnapshotRef(String name, SnapshotRef ref) {
+      ValidationException.check(snapshotsById.get(ref.snapshotId()) != null,
+          "Cannot create branch %s referring to unknown snapshot %d", name, 
ref.snapshotId());
+      ValidationException.check(!refs.containsKey(name), "Cannot create ref 
%s. Reference already exists", name);
+      refs.put(name, ref);
+      changes.add(new MetadataUpdate.CreateSnapshotRef(name, ref));
+      return this;
+    }
+
+    public Builder removeSnapshotRef(String name) {

Review comment:
       Is this needed?




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