private static void createOrReplaceBranch(ManageSnapshots manageSnapshots, Table table, boolean isReplace,
      String branchName, Long snapshotId) {
    if (isReplace) {
      LOG.info("Replacing branch {} on an iceberg table {} with snapshotId {}", branchName, table.name(), snapshotId);
      manageSnapshots.replaceBranch(branchName, snapshotId);
    } else {
      LOG.info("Creating a branch {} on an iceberg table {} with snapshotId {}", branchName, table.name(), snapshotId);
      manageSnapshots.createBranch(branchName, snapshotId);
    }
  }
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