rdblue commented on code in PR #6527:
URL: https://github.com/apache/iceberg/pull/6527#discussion_r1199818257


##########
core/src/main/java/org/apache/iceberg/deletes/Deletes.java:
##########
@@ -142,6 +147,52 @@ public static PositionDeleteIndex 
toPositionIndex(CloseableIterable<Long> posDel
     }
   }
 
+  public static <T extends StructLike> Map<String, PositionDeleteIndex> 
toPositionIndexMap(
+      CharSequenceSet dataLocations, List<CloseableIterable<T>> deleteFiles) {
+    DataFileFilter<T> locationFilter = new DataFileFilter<>(dataLocations);
+    List<CloseableIterable<Pair<String, Long>>> positions =
+        Lists.transform(
+            deleteFiles,
+            deletes ->
+                CloseableIterable.transform(
+                    locationFilter.filter(deletes),

Review Comment:
   Changing the filter has removed the need for having one in the first place. 
Instead, I think this should use `CloseabileIterable.filter` directly.



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