public static PartitionStatisticsFile computeAndWriteStatsFile(Table table) {
    return computeAndWriteStatsFile(table, null);
  }
Computes and writes the {@link PartitionStatisticsFile} for a given table's current snapshot.

@param table The {@link Table} for which the partition statistics is computed.
@return {@link PartitionStatisticsFile} for the current snapshot.
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/data/PartitionStatsHandler.java