private static PartitionSpec spec(Properties props, Schema schema) {
    String specString = props.getProperty(InputFormatConfig.PARTITION_SPEC);
    PartitionSpec spec = PartitionSpec.unpartitioned();
    if (specString != null) {
      spec = PartitionSpecParser.fromJson(schema, specString);
    }
    return spec;
  }
Get the partition spec from the properties
@param props the controlling properties
@param schema instance of the iceberg schema
@return  instance of the partition spec
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java