public static void renameBranch(Table table, AlterTableSnapshotRefSpec.RenameSnapshotrefSpec renameSnapshotrefSpec) {
    String sourceBranch = renameSnapshotrefSpec.getSourceBranchName();
    String targetBranch = renameSnapshotrefSpec.getTargetBranchName();

    LOG.info("Renaming branch {} to {} on iceberg table {}", sourceBranch, targetBranch, table.name());
    table.manageSnapshots().renameBranch(sourceBranch, targetBranch).commit();
  }
Create a branch on the iceberg table
@param table the iceberg table
@param createBranchSpec Get the basic parameters needed to create a branch
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergSnapshotRefExec.java