TaoZex commented on code in PR #2748: URL: https://github.com/apache/incubator-paimon/pull/2748#discussion_r1470636068
########## paimon-core/src/main/java/org/apache/paimon/utils/BranchManager.java: ########## @@ -72,6 +73,9 @@ public Path branchPath(String branchName) { } public void createBranch(String branchName, String tagName) { + checkArgument( + !branchName.equals(DEFAULT_MAIN_BRANCH), + "Branch name 'main' is the default branch and cannot be used."); checkArgument(!StringUtils.isBlank(branchName), "Branch name '%s' is blank.", branchName); checkArgument(!branchExists(branchName), "Branch name '%s' already exists.", branchName); checkArgument(tagManager.tagExists(tagName), "Tag name '%s' not exists.", tagName); Review Comment: The branchExists method already checks the branch path. -- 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: issues-unsubscr...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org