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



##########
File path: api/src/main/java/org/apache/iceberg/ManageSnapshots.java
##########
@@ -80,4 +80,72 @@
    * wapId
    */
   ManageSnapshots cherrypick(long snapshotId);
+
+  /**
+   * Create a new branch where the snapshot with the given id will be the head 
of the branch.
+   *
+   * @param name branch name
+   * @param snapshotId id of the snapshot which will be the head of the branch
+   * @return this for method chaining
+   * @throws IllegalArgumentException if a branch with the given name already 
exists
+   */
+  ManageSnapshots createBranch(String name, long snapshotId);
+
+  /**
+   * Remove the branch with the given name.
+   *
+   * @param name branch name
+   * @return this for method chaining
+   * @throws IllegalArgumentException if the branch does not exist
+   */
+  ManageSnapshots removeBranch(String name);
+
+  /**
+   * Replace the current head snapshot of the given branch with the snapshot 
with the given id.
+   * If the branch with the given name does not exist, a new branch will be 
created.

Review comment:
       I think this should state the behavior of branch properties, like 
snapshots to keep.
   
   Also, are you sure that this should create or update the branch? I think 
that makes sense for writing to a branch (since there is a job that has done 
work) but I'm not sure about doing it for metadata-only operations.




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