public static void assertHivePartitionLocations(
      Map<String, String> partitionLocations, MixedTable table) throws TException {
    TableIdentifier identifier = table.id();
    final String database = identifier.getDatabase();
    final String tableName = identifier.getTableName();

    List<Partition> partitions = hms.getClient().listPartitions(database, tableName, (short) -1);

    System.out.println("> assert hive partition location as expected");
    System.out.printf(
        "HiveTable[%s.%s] partition count: %d \n", database, tableName, partitions.size());
    for (Partition p : partitions) {
      System.out.printf(
          "HiveTablePartition[%s.%s  %s] location:%s \n",
          database, tableName, Joiner.on("/").join(p.getValues()), p.getSd().getLocation());
    }

    Assert.assertEquals(
        "expect " + partitionLocations.size() + " partition after first rewrite partition",
        partitionLocations.size(),
        partitions.size());

    for (Partition p : partitions) {
      String valuePath = getPartitionPath(p.getValues(), table.spec());
      Assert.assertTrue(
          "partition " + valuePath + " is not expected", partitionLocations.containsKey(valuePath));

      String locationExpect = partitionLocations.get(valuePath);
      String actualLocation = p.getSd().getLocation();
      Assert.assertTrue(
          "partition location is not expected, expect "
              + actualLocation
              + " end-with "
              + locationExpect,
          actualLocation.contains(locationExpect));
    }
  }
assert hive table partition location as expected

@param partitionLocations
@param table
@throws TException
amoro-format-mixed/amoro-mixed-trino/src/test/java/org/apache/amoro/trino/mixed/TestHiveTableBaseForTrino.java