MCPcopy Create free account
hub / github.com/apache/arrow / DeclarationToString

Function DeclarationToString

cpp/src/arrow/acero/exec_plan.cc:745–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743} // namespace
744
745Result<std::string> DeclarationToString(const Declaration& declaration,
746 FunctionRegistry* function_registry) {
747 // We pass in the default memory pool and the CPU executor but nothing we are doing
748 // should be starting new thread tasks or making large allocations.
749 ExecContext exec_context(default_memory_pool(), ::arrow::internal::GetCpuThreadPool(),
750 function_registry);
751 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ExecPlan> exec_plan,
752 ExecPlan::Make(exec_context));
753 ARROW_ASSIGN_OR_RAISE(ExecNode * last_node, declaration.AddToPlan(exec_plan.get()));
754 ARROW_ASSIGN_OR_RAISE(last_node, EnsureSink(last_node, exec_plan.get()));
755 ARROW_RETURN_NOT_OK(exec_plan->Validate());
756 return exec_plan->ToString();
757}
758
759Future<std::shared_ptr<Table>> DeclarationToTableAsync(Declaration declaration,
760 ExecContext exec_context) {

Callers 2

DoGetStatementMethod · 0.85
TESTFunction · 0.85

Calls 9

default_memory_poolFunction · 0.85
GetCpuThreadPoolFunction · 0.85
EnsureSinkFunction · 0.85
AddToPlanMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
MakeFunction · 0.50
getMethod · 0.45
ValidateMethod · 0.45
ToStringMethod · 0.45

Tested by 1

TESTFunction · 0.68