raunaqmorarka commented on code in PR #14921:
URL: https://github.com/apache/iceberg/pull/14921#discussion_r2650243028


##########
core/src/main/java/org/apache/iceberg/ReachableFileCleanup.java:
##########
@@ -208,8 +231,16 @@ private Set<String> findFilesToDelete(
                 }
 
                 // Remove all the live files from the candidate deletion set
-                try (CloseableIterable<String> paths = 
ManifestFiles.readPaths(manifest, fileIO)) {
-                  paths.forEach(filesToDelete::remove);
+                try (ManifestReader<DataFile> reader =
+                    ManifestFiles.read(manifest, fileIO)
+                        .select(ImmutableList.of("content", "file_path"))) {
+                  reader
+                      .liveEntries()
+                      .forEach(
+                          entry -> {
+                            DataFile file = entry.file();
+                            filesToDelete.remove(new FileInfo(file.content(), 
file.location()));
+                          });

Review Comment:
   its not exactly the same, but i have extracted some of the common part now



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to