| 874 | } |
| 875 | |
| 876 | Result<BatchesWithCommonSchema> DeclarationToExecBatches( |
| 877 | Declaration declaration, bool use_threads, MemoryPool* memory_pool, |
| 878 | FunctionRegistry* function_registry) { |
| 879 | return ::arrow::internal::RunSynchronously<Future<BatchesWithCommonSchema>>( |
| 880 | [=, declaration = std::move(declaration)](::arrow::internal::Executor* executor) { |
| 881 | ExecContext ctx(memory_pool, executor, function_registry); |
| 882 | return DeclarationToExecBatchesImpl( |
| 883 | std::move(declaration), QueryOptionsFromArgs(memory_pool, function_registry), |
| 884 | executor); |
| 885 | }, |
| 886 | use_threads); |
| 887 | } |
| 888 | |
| 889 | Result<BatchesWithCommonSchema> DeclarationToExecBatches(Declaration declaration, |
| 890 | QueryOptions query_options) { |