private static void validatePartitionSpec(SearchArgument sarg, PartitionSpec partitionSpec) {
    for (PredicateLeaf leaf : sarg.getLeaves()) {
      TransformSpec transformSpec = TransformSpec.fromStringWithColumnName(leaf.getColumnName());
      Types.NestedField column = partitionSpec.schema().findField(transformSpec.getColumnName());
      PartitionField partitionColumn =
          partitionSpec.fields().stream().filter(pf -> pf.sourceId() == column.fieldId()).findFirst().get();

      if (!(partitionColumn.transform() == null && transformSpec.transformTypeString() == null) &&
          !partitionColumn.transform().toString().equalsIgnoreCase(transformSpec.transformTypeString())) {
        throw new UnsupportedOperationException(
            "Invalid transform for column: " + transformSpec.getColumnName() +
                " Expected: " + partitionColumn.transform() +
                " Found: " + transformSpec.getTransformType());
      }
    }
  }
Calculates the properties we would like to send to the catalog.
<ul>
<li>The base of the properties is the properties stored at the Hive Metastore for the given table
<li>We add the {@link Catalogs#LOCATION} as the table location
<li>We add the {@link Catalogs#NAME} as TableIdentifier defined by the database name and table name
<li>We add the serdeProperties of the HMS table
<li>We remove some parameters that we don't want to push down to the Iceberg table props
</ul>
@param hmsTable Table for which we are calculating the properties
@return The properties we can provide for Iceberg functions, like {@link Catalogs}
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java