static WriteResult readCompletedFiles(
            DeltaManifests deltaManifests, FileIO io, Map<Integer, PartitionSpec> specsById)
            throws IOException {
        WriteResult.Builder builder = WriteResult.builder();

        // Read the completed data files from persisted data manifest file.
        if (deltaManifests.dataManifest() != null) {
            builder.addDataFiles(readDataFiles(deltaManifests.dataManifest(), io, specsById));
        }

        // Read the completed delete files from persisted delete manifests file.
        if (deltaManifests.deleteManifest() != null) {
            try (CloseableIterable<DeleteFile> deleteFiles =
                    ManifestFiles.readDeleteManifest(deltaManifests.deleteManifest(), io, specsById)) {
                builder.addDeleteFiles(deleteFiles);
            }
        }

        return builder.addReferencedDataFiles(deltaManifests.referencedDataFiles()).build();
    }
Write the {@link WriteResult} to temporary manifest files.

@param result all those DataFiles/DeleteFiles in this WriteResult should be written with same
    partition spec
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/FlinkManifestUtil.java