RussellSpitzer commented on code in PR #11157: URL: https://github.com/apache/iceberg/pull/11157#discussion_r1848647496
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java: ########## @@ -971,4 +979,109 @@ public int hashCode() { return Objects.hashCode(values, uri, format); } } + + @Nullable + public static ExecutorService executorService(int parallelism) { + return parallelism == 1 ? null : new ExecutorServiceFactory(parallelism); + } + + private static class ExecutorServiceFactory implements ExecutorService, Serializable { Review Comment: Probably needs a rename since this doesn't actually make Executor Services, probably just LazyExcutorService? ########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java: ########## @@ -971,4 +979,109 @@ public int hashCode() { return Objects.hashCode(values, uri, format); } } + + @Nullable + public static ExecutorService executorService(int parallelism) { + return parallelism == 1 ? null : new ExecutorServiceFactory(parallelism); + } + + private static class ExecutorServiceFactory implements ExecutorService, Serializable { Review Comment: Probably needs a rename since this doesn't actually make Executor Services, probably just LazyExecutorService? -- 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