public static WriteResult readCompletedFiles(DeltaManifests deltaManifests, FileIO io) 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));
        }

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

        return builder.addReferencedDataFiles(deltaManifests.referencedDataFiles())
                .build();
    }
Copy from iceberg-flink:iceberg-flink-1.13:0.13.2
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/FlinkManifestUtil.java