rdblue commented on a change in pull request #4146:
URL: https://github.com/apache/iceberg/pull/4146#discussion_r809331653



##########
File path: core/src/main/java/org/apache/iceberg/DataTableScan.java
##########
@@ -94,7 +93,7 @@ protected TableScan newRefinedScan(TableOperations ops, Table 
table, Schema sche
     }
 
     if (PLAN_SCANS_WITH_WORKER_POOL && snapshot.dataManifests().size() > 1) {
-      manifestGroup = manifestGroup.planWith(ThreadPools.getWorkerPool());
+      manifestGroup = manifestGroup.planWith(context().planExecutor());

Review comment:
       I think the logic here needs to be slightly different. If `planWith` was 
called, then the environment option `PLAN_SCANS_WITH_WORKER_POOL` should be 
ignored.
   
   ```java
     if (snapshot.dataManifests().size() > 1 &&
         (PLAN_SCANS_WITH_WORKER_POOL || context().planExecutor() != 
ThreadPools.getWorkerPool())) {
       manifestGroup.planWith(context().planExecutor());
     }
   ```




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