| 921 | } |
| 922 | |
| 923 | Status DeclarationToStatus(Declaration declaration, bool use_threads, |
| 924 | MemoryPool* memory_pool, FunctionRegistry* function_registry) { |
| 925 | return ::arrow::internal::RunSynchronously<Future<>>( |
| 926 | [=, declaration = std::move(declaration)](::arrow::internal::Executor* executor) { |
| 927 | ExecContext ctx(memory_pool, executor, function_registry); |
| 928 | return DeclarationToStatusImpl( |
| 929 | std::move(declaration), QueryOptionsFromArgs(memory_pool, function_registry), |
| 930 | executor); |
| 931 | }, |
| 932 | use_threads); |
| 933 | } |
| 934 | |
| 935 | Status DeclarationToStatus(Declaration declaration, QueryOptions query_options) { |
| 936 | if (query_options.custom_cpu_executor != nullptr) { |