deniskuzZ commented on code in PR #4627:
URL: https://github.com/apache/hive/pull/4627#discussion_r1304107249
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -242,4 +242,17 @@ public static void setCurrentSnapshot(Table table, Long
value) {
manageSnapshots.setCurrentSnapshot(value);
manageSnapshots.commit();
}
+
+ /**
+ * Fast forwards a branch to another.
+ * @param table the iceberg table
+ * @param sourceBranch the source branch
+ * @param targetBranch the target branch
+ */
+ public static void fastForwardBranch(Table table, String sourceBranch,
String targetBranch) {
+ ManageSnapshots manageSnapshots = table.manageSnapshots();
+ LOG.debug("Fast Forwarding the iceberg table {} branch {} to {}",
table.name(), sourceBranch, targetBranch);
+ manageSnapshots.fastForwardBranch(sourceBranch, targetBranch);
Review Comment:
is it going to check for conflicts with the targetBranch? scenario: someone
wrote to the target branch after it was branched out.
--
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]