westonpace commented on code in PR #14867:
URL: https://github.com/apache/arrow/pull/14867#discussion_r1042292097


##########
cpp/src/arrow/compute/exec/source_node.cc:
##########
@@ -308,9 +308,6 @@ struct SchemaSourceNode : public SourceNode {
     auto& schema = cast_options.schema;
     auto io_executor = cast_options.io_executor;
 
-    if (io_executor == NULLPTR) {
-      io_executor = plan->exec_context()->executor();
-    }

Review Comment:
   It's not terribly relevant.  I was initially wanting to use 
`exec_batch_source` here but ran into a problem because I was not transferring 
off the background generator.  Incidentally, I think it may be close to time to 
fix the background generator to remove this limitation, but I have enough on my 
plate for the moment.
   
   This change was simply because, a few lines down (on line 316) we have a 
very similar if condition:
   
   ```
       if (io_executor == NULLPTR) {
         io_executor = io::internal::GetIOThreadPool();
       }
   ```
   
   I don't think we need both of these statements and defaulting to the I/O 
thread pool seemed like the better default.  If that is not the correct 
default, or there is some subtlety I am missing, let me know and I can revert 
this.



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

Reply via email to