rdblue commented on a change in pull request #2712:
URL: https://github.com/apache/iceberg/pull/2712#discussion_r654568912



##########
File path: core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
##########
@@ -332,7 +332,8 @@ protected void validateDataFilesExist(TableMetadata base, 
Long startingSnapshotI
 
     ManifestGroup matchingDeletesGroup = new ManifestGroup(ops.io(), 
manifests, ImmutableList.of())
         .filterManifestEntries(entry -> entry.status() != 
ManifestEntry.Status.ADDED &&
-            newSnapshots.contains(entry.snapshotId()) && 
requiredDataFiles.contains(entry.file().path()))
+            newSnapshots.contains(entry.snapshotId()) &&
+            
requiredDataFiles.stream().anyMatch(entry.file().path().toString()::contains))

Review comment:
       This was correct because the set passed in is actually a 
`CharSequenceSet`: 
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/BaseRowDelta.java#L29
   
   To fix the error-prone warning and ensure that future uses are also 
`CharSequenceSet`, I think that a better fix is to change `Set<CharSequence>` 
to `CharSequenceSet` in the method arguments.




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

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