rdblue commented on code in PR #15241:
URL: https://github.com/apache/iceberg/pull/15241#discussion_r2898304485
##########
core/src/test/java/org/apache/iceberg/hadoop/TestCatalogUtilDropTable.java:
##########
@@ -222,10 +223,18 @@ private static Set<String>
manifestLocations(Set<Snapshot> snapshotSet, FileIO i
.collect(Collectors.toSet());
}
- private static Set<String> dataLocations(Set<Snapshot> snapshotSet, FileIO
io) {
+ private static Set<String> dataLocations(Set<Snapshot> snapshotSet, Table
table) {
return snapshotSet.stream()
- .flatMap(snapshot ->
StreamSupport.stream(snapshot.addedDataFiles(io).spliterator(), false))
- .map(ContentFile::location)
+ .flatMap(
+ snapshot ->
+ StreamSupport.stream(
+ SnapshotChanges.builderFor(table)
+ .snapshot(snapshot)
+ .build()
+ .addedDataFiles()
+ .spliterator(),
Review Comment:
`spliterator` is weird. We avoid using it in most of the codebase. Is this
for adapting to streams?
We normally use `Streams.stream(iterable)`.
--
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]