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

Function ExecuteSerializedPlan

cpp/src/arrow/engine/substrait/util.cc:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace engine {
44
45Result<std::shared_ptr<RecordBatchReader>> ExecuteSerializedPlan(
46 const Buffer& substrait_buffer, const ExtensionIdRegistry* registry,
47 compute::FunctionRegistry* func_registry, const ConversionOptions& conversion_options,
48 bool use_threads, MemoryPool* memory_pool) {
49 ARROW_ASSIGN_OR_RAISE(PlanInfo plan_info,
50 DeserializePlan(substrait_buffer, registry,
51 /*ext_set_out=*/nullptr, conversion_options));
52 acero::QueryOptions query_options;
53 query_options.memory_pool = memory_pool;
54 query_options.function_registry = func_registry;
55 query_options.use_threads = use_threads;
56 query_options.field_names = plan_info.names;
57 return acero::DeclarationToReader(std::move(plan_info.root.declaration),
58 std::move(query_options));
59}
60
61Result<std::shared_ptr<Buffer>> SerializeJsonPlan(const std::string& substrait_json) {
62 return engine::internal::SubstraitFromJSON("Plan", substrait_json);

Callers 1

TESTFunction · 0.85

Calls 1

DeclarationToReaderFunction · 0.85

Tested by 1

TESTFunction · 0.68