public static void createPartitionIfAbsent(
      HMSClientPool hmsClient,
      MixedTable mixedTable,
      List<String> partitionValues,
      String partitionLocation,
      List<DataFile> dataFiles,
      int accessTimestamp) {
    String db = mixedTable.id().getDatabase();
    String tableName = mixedTable.id().getTableName();

    try {
      hmsClient.run(
          client -> {
            Partition partition;
            try {
              partition = client.getPartition(db, tableName, partitionValues);
              return partition;
            } catch (NoSuchObjectException noSuchObjectException) {
              Table hiveTable = client.getTable(db, tableName);
              partition =
                  newPartition(
                      hiveTable, partitionValues, partitionLocation, dataFiles, accessTimestamp);
              client.addPartition(partition);
              return partition;
            }
          });
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
Change the Hive partition location.

@param hiveClient Hive client from MixedHiveCatalog
@param tableIdentifier A table identifier
@param partition A Hive partition name
@param newPath Target partition location
amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/HivePartitionUtil.java