public static Schema schema(StructType partitionType) {
    Preconditions.checkState(!partitionType.fields().isEmpty(), "table must be partitioned");
    return new Schema(
        NestedField.required(1, Column.PARTITION.name(), partitionType),
        NestedField.required(2, Column.SPEC_ID.name(), IntegerType.get()),
        NestedField.required(3, Column.DATA_RECORD_COUNT.name(), LongType.get()),
        NestedField.required(4, Column.DATA_FILE_COUNT.name(), IntegerType.get()),
        NestedField.required(5, Column.TOTAL_DATA_FILE_SIZE_IN_BYTES.name(), LongType.get()),
        NestedField.optional(6, Column.POSITION_DELETE_RECORD_COUNT.name(), LongType.get()),
        NestedField.optional(7, Column.POSITION_DELETE_FILE_COUNT.name(), IntegerType.get()),
        NestedField.optional(8, Column.EQUALITY_DELETE_RECORD_COUNT.name(), LongType.get()),
        NestedField.optional(9, Column.EQUALITY_DELETE_FILE_COUNT.name(), IntegerType.get()),
        NestedField.optional(10, Column.TOTAL_RECORD_COUNT.name(), LongType.get()),
        NestedField.optional(11, Column.LAST_UPDATED_AT.name(), LongType.get()),
        NestedField.optional(12, Column.LAST_UPDATED_SNAPSHOT_ID.name(), LongType.get()));
  }
Generates the partition stats file schema based on a given partition type.

<p>Note: Provide the unified partition schema type as mentioned in the spec.

@param partitionType unified partition schema type.
@return a schema that corresponds to the provided unified partition type.
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/data/PartitionStatsHandler.java