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

Method Make

cpp/src/arrow/acero/source_node.cc:377–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 : SourceNode(plan, schema, generator, Ordering::Implicit()) {}
376
377 static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs,
378 const ExecNodeOptions& options) {
379 RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 0, This::kKindName));
380 const auto& cast_options = checked_cast<const Options&>(options);
381 auto& it_maker = cast_options.it_maker;
382 auto& schema = cast_options.schema;
383 auto io_executor = cast_options.io_executor;
384
385 auto it = it_maker();
386
387 if (schema == nullptr) {
388 return Status::Invalid(This::kKindName, " requires schema which is not null");
389 }
390
391 if (cast_options.requires_io) {
392 if (io_executor == nullptr) {
393 io_executor = io::internal::GetIOThreadPool();
394 }
395 } else {
396 if (io_executor != nullptr) {
397 return Status::Invalid(
398 This::kKindName,
399 " specified with requires_io=false but io_executor was not nullptr");
400 }
401 }
402
403 ARROW_ASSIGN_OR_RAISE(auto generator, This::MakeGenerator(it, io_executor, schema));
404 return plan->EmplaceNode<This>(plan, schema, generator);
405 }
406};
407
408struct RecordBatchReaderSourceNode : public SourceNode {

Callers

nothing calls this directly

Calls 3

ValidateExecNodeInputsFunction · 0.85
GetIOThreadPoolFunction · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected