public static PartitionSpec copyPartitionSpec(PartitionSpec partitionSpec, Schema copySchema) {
    PartitionSpec.Builder builder = PartitionSpec.builderFor(copySchema);
    // For all tables in the mixed hive format it is necessary to also lowercase the partition name
    // value in the iceberg
    // table, otherwise some case-matching exceptions will be thrown.
    partitionSpec
        .fields()
        .forEach(
            partitionField -> {
              builder.add(
                  partitionField.sourceId(),
                  partitionField.name().toLowerCase(),
                  partitionField.transform());
            });
    return builder.build();
  }
Copy an new partition spec depend on an new schema, new schema should contain the same fields
partition spec need.

@param partitionSpec partition spec to be copied
@param copySchema schema new partition spec depend on
@return the new partition spec
amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/iceberg/IcebergSchemaUtil.java