JunRuiLee commented on code in PR #7882:
URL: https://github.com/apache/paimon/pull/7882#discussion_r3265805815
##########
paimon-api/src/main/java/org/apache/paimon/rest/RESTApi.java:
##########
@@ -1006,6 +1007,25 @@ public void fastForward(Identifier identifier, String
branch) {
restAuthFunction);
}
+ /**
+ * Merge branch for table.
+ *
+ * @param identifier database name and table name.
+ * @param sourceBranch source branch name
+ * @param targetBranch target branch name
+ * @throws NoSuchResourceException Exception thrown on HTTP 404 means the
branch or table not
+ * exists
+ * @throws ForbiddenException Exception thrown on HTTP 403 means don't
have the permission for
+ * this table
+ */
+ public void mergeBranch(Identifier identifier, String sourceBranch, String
targetBranch) {
Review Comment:
Thanks for the question. Yes, it creates a new commit on the target branch.
I added it for REST catalog because branch merge needs to read and validate
metadata from both branches before committing. It is also aligned with
fastForward, which is already a REST branch operation.
--
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]