private static FilesStatistics collectOptimizingFileInfo(MetricsSummary metricsSummary) {
    if (metricsSummary == null) {
      return null;
    }
    return FilesStatistics.builder()
        .addFiles(metricsSummary.getEqualityDeleteSize(), metricsSummary.getEqDeleteFileCnt())
        .addFiles(
            Math.max(
                metricsSummary.getPositionalDeleteSize(), metricsSummary.getPositionDeleteSize()),
            metricsSummary.getPosDeleteFileCnt())
        .addFiles(metricsSummary.getRewriteDataSize(), metricsSummary.getRewriteDataFileCnt())
        .build();
  }
Build current table optimize info.

@return TableOptimizeInfo
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/utils/OptimizingUtil.java