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



##########
File path: core/src/main/java/org/apache/iceberg/SnapshotManager.java
##########
@@ -54,6 +54,73 @@ public ManageSnapshots rollbackTo(long snapshotId) {
     return this;
   }
 
+  @Override
+  public ManageSnapshots createBranch(String name, long snapshotId) {
+    return createBranch(name, snapshotId, null, null, null);
+  }
+
+
+  @Override
+  public ManageSnapshots createBranch(
+      String name,
+      long snapshotId,
+      Long maxRefAgeMs,
+      Integer minSnapshotsToKeep,
+      Long maxSnapshotAgeMs) {
+
+    transaction
+        .manageSnapshotReferenceOperation()
+        .createBranch(name, snapshotId, maxRefAgeMs, minSnapshotsToKeep, 
maxSnapshotAgeMs)
+        .commit();
+    return this;
+  }
+
+  @Override
+  public ManageSnapshots createTag(String name, long snapshotId) {
+    return createTag(name, snapshotId, null);
+  }
+
+  @Override
+  public ManageSnapshots createTag(String name, long snapshotId, Long 
maxRefAgeMs) {
+    transaction.manageSnapshotReferenceOperation().createTag(name, snapshotId, 
maxRefAgeMs).commit();

Review comment:
       Can you update this so that the last `manageSnapshotReferenceOperation` 
is reused? That way we don't create a ton of unnecessary operations in the 
transaction.




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