private static Comparator<PartitionStats> partitionStatsCmp(StructType partitionType) {
    return Comparator.comparing(PartitionStats::partition, Comparators.forType(partitionType));
  }
Sorts the {@link PartitionStats} based on the partition data.

@param stats collection of {@link PartitionStats} which needs to be sorted.
@param partitionType unified partition schema.
@return the list of {@link PartitionStats}
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/PartitionStatsUtil.java