rdblue commented on code in PR #6432: URL: https://github.com/apache/iceberg/pull/6432#discussion_r1072967562
########## core/src/main/java/org/apache/iceberg/deletes/Deletes.java: ########## @@ -135,6 +141,11 @@ public static StructLikeSet toEqualitySet( } } + @VisibleForTesting + static void setDeletePosThreadPool(ExecutorService threadPool) { Review Comment: This is okay, but I think it is better to be able to set the threadpool when running an operation that uses one instead of modifying shared state. How about changing `toPositionIndex` like this? ```java public static <T extends StructLike> PositionDeleteIndex toPositionIndex( CharSequence dataLocation, List<CloseableIterable<T>> deleteFiles) { return toPositionIndex(dataLocation, deleteFiles, ThreadPools.getDeleteWorkerPool()); } public static <T extends StructLike> PositionDeleteIndex toPositionIndex( CharSequence dataLocation, List<CloseableIterable<T>> deleteFiles, ExecutorService threadPool) { ... if (positions.size() > 1 && threadPool != null) { return toPositionIndex(new ParallelIterable<>(positions, deletePosThreadPool)); } else { return toPositionIndex(CloseableIterable.concat(positions))); } } ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org