amogh-jahagirdar commented on code in PR #11131: URL: https://github.com/apache/iceberg/pull/11131#discussion_r1851085147
########## core/src/main/java/org/apache/iceberg/ManifestFilterManager.java: ########## @@ -307,12 +331,22 @@ private void invalidateFilteredCache() { /** * @return a ManifestReader that is a filtered version of the input manifest. */ - private ManifestFile filterManifest(Schema tableSchema, ManifestFile manifest) { + private ManifestFile filterManifest( + Schema tableSchema, ManifestFile manifest, boolean trustReferencedManifests) { ManifestFile cached = filteredManifests.get(manifest); if (cached != null) { return cached; } + boolean manifestIsReferenced = manifestsReferencedForDeletes.contains(manifest.path()); + + // The manifest does not need to be rewritten if the referenced set can be trusted and the + // manifest is not referenced + if (trustReferencedManifests && !manifestIsReferenced) { Review Comment: Inverting the hasLiveFiles check and embedding that in the canContainDeletedFiles method is a great idea, went ahead and did that. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org