You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/06/21 09:00:56 UTC

[GitHub] [iceberg] nastra commented on a change in pull request #2712: Use CharSequenceSet instead of Set to avoid undefined equality check behavior

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



##########
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:
       I think we might want to adjust all the places where `Set<CharSequence>` is being used just to make sure. I went ahead and adjusted all production code.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org