westonpace commented on code in PR #33623:
URL: https://github.com/apache/arrow/pull/33623#discussion_r1068403516
##########
cpp/src/arrow/compute/exec/exec_plan.cc:
##########
@@ -563,23 +563,28 @@ Future<std::shared_ptr<Table>>
DeclarationToTableAsync(Declaration declaration,
return exec_plan->finished().Then([exec_plan, output_table] { return
*output_table; });
}
-Future<std::shared_ptr<Table>> DeclarationToTableAsync(Declaration declaration,
- bool use_threads) {
+Future<std::shared_ptr<Table>> DeclarationToTableAsync(
+ Declaration declaration, bool use_threads, MemoryPool* memory_pool,
+ FunctionRegistry* function_registry) {
if (use_threads) {
- return DeclarationToTableAsync(std::move(declaration),
*threaded_exec_context());
+ ExecContext ctx(memory_pool, ::arrow::internal::GetCpuThreadPool(),
Review Comment:
Yes. If the user is passing in `bool use_threads` then they are choosing
between "current thread" and "CPU thread pool". This keeps the simple case
simple for most users.
If the user doesn't want the CPU thread pool and they don't want to do
everything on the calling thread then they can use the overload that takes a
custom `ExecContext`.
--
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]