public static Set<String> getHiveLocation(MixedTable table) {
    Set<String> hiveLocations = new HashSet<>();
    if (TableTypeUtil.isHive(table)) {
      if (table.spec().isUnpartitioned()) {
        try {
          Table hiveTable =
              ((SupportHive) table)
                  .getHMSClient()
                  .run(
                      client ->
                          client.getTable(table.id().getDatabase(), table.id().getTableName()));
          hiveLocations.add(TableFileUtil.getUriPath(hiveTable.getSd().getLocation()));
        } catch (Exception e) {
          throw new IllegalStateException("Failed to get hive table location", e);
        }
      } else {
        try {
          List<Partition> partitions =
              ((SupportHive) table)
                  .getHMSClient()
                  .run(
                      client ->
                          client.listPartitions(
                              table.id().getDatabase(),
                              table.id().getTableName(),
                              Short.MAX_VALUE));
          for (Partition partition : partitions) {
            hiveLocations.add(TableFileUtil.getUriPath(partition.getSd().getLocation()));
          }
        } catch (Exception e) {
          throw new IllegalStateException("Failed to get hive partition locations", e);
        }
      }
    }

    return hiveLocations;
  }
Get table hive table/partition location

@param table target table
@return hive table/partition location
amoro-ams/src/main/java/org/apache/amoro/server/utils/HiveLocationUtil.java