public static List<PartitionStats> sortStats(
      Collection<PartitionStats> stats, StructType partitionType) {
    List<PartitionStats> entries = Lists.newArrayList(stats);
    entries.sort(partitionStatsCmp(partitionType));
    return entries;
  }
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