stevenzwu commented on code in PR #13222:
URL: https://github.com/apache/iceberg/pull/13222#discussion_r2190783604


##########
core/src/main/java/org/apache/iceberg/ManifestFilterManager.java:
##########
@@ -224,7 +235,9 @@ List<ManifestFile> filterManifests(Schema tableSchema, 
List<ManifestFile> manife
   private boolean canTrustManifestReferences(List<ManifestFile> manifests) {
     Set<String> manifestLocations =
         manifests.stream().map(ManifestFile::path).collect(Collectors.toSet());
-    return allDeletesReferenceManifests && 
manifestLocations.containsAll(manifestsWithDeletes);

Review Comment:
   The boolean `trustManifestReferences` is used by `canContainDeletedFiles` 
method. 
   
   When `trustManifestReferences` is true (old behavior), this code would 
return false since `manifestsWithDeletes` is empty.
   ```
       if (trustManifestReferences) {
         return manifestsWithDeletes.contains(manifest.path());
       }
   ```
   
   When `trustManifestReferences` is false (new behavior), the above code won't 
be returned. So it went on to execute this block.
   ```
       return canContainDroppedFiles(manifest)
           || canContainExpressionDeletes(manifest)
           || canContainDroppedPartitions(manifest);
   ```
   
   Seems that new behavior is the correct behavior



-- 
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