public RewriteStageTask buildTask(OptimizingInputProperties properties) {
      Set<ContentFile<?>> readOnlyDeleteFiles = Sets.newHashSet();
      Set<ContentFile<?>> rewriteDeleteFiles = Sets.newHashSet();
      for (ContentFile<?> deleteFile : deleteFiles) {
        if (reservedDeleteFiles.contains(deleteFile.path().toString())) {
          readOnlyDeleteFiles.add(deleteFile);
        } else {
          rewriteDeleteFiles.add(deleteFile);
        }
      }
      RewriteFilesInput input =
          new RewriteFilesInput(
              rewriteDataFiles.toArray(new DataFile[0]),
              rewritePosDataFiles.toArray(new DataFile[0]),
              readOnlyDeleteFiles.toArray(new ContentFile[0]),
              rewriteDeleteFiles.toArray(new ContentFile[0]),
              tableObject);
      PartitionSpec spec =
          MixedTableUtil.getMixedTablePartitionSpecById(tableObject, partition.first());
      String partitionPath = spec.partitionToPath(partition.second());
      return new RewriteStageTask(
          identifier.getId(), partitionPath, input, properties.getProperties());
    }
When splitTask has only one undersized segment file, it needs to be triggered again to
determine whether to rewrite pos. If needed, add it to rewritePosDataFiles and bin-packing
together, else reserved delete files.
amoro-format-iceberg/src/main/java/org/apache/amoro/optimizing/plan/AbstractPartitionPlan.java