| 708 | } |
| 709 | |
| 710 | Future<> DeclarationToStatusImpl(Declaration declaration, QueryOptions options, |
| 711 | ::arrow::internal::Executor* cpu_executor) { |
| 712 | ExecContext exec_ctx(options.memory_pool, cpu_executor, options.function_registry); |
| 713 | ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ExecPlan> exec_plan, |
| 714 | ExecPlan::Make(options, exec_ctx)); |
| 715 | ARROW_ASSIGN_OR_RAISE(ExecNode * last_node, declaration.AddToPlan(exec_plan.get())); |
| 716 | if (!last_node->is_sink()) { |
| 717 | ConsumingSinkNodeOptions sink_options(NullSinkNodeConsumer::Make()); |
| 718 | sink_options.sequence_output = options.sequence_output; |
| 719 | Declaration null_sink = Declaration("consuming_sink", {last_node}, sink_options); |
| 720 | ARROW_RETURN_NOT_OK(null_sink.AddToPlan(exec_plan.get())); |
| 721 | } |
| 722 | ARROW_RETURN_NOT_OK(exec_plan->Validate()); |
| 723 | exec_plan->StartProducing(); |
| 724 | // Keep the exec_plan alive until it finishes |
| 725 | return exec_plan->finished().Then([exec_plan]() {}); |
| 726 | } |
| 727 | |
| 728 | QueryOptions QueryOptionsFromCustomExecContext(ExecContext exec_context) { |
| 729 | QueryOptions options; |
no test coverage detected