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

Method Make

cpp/src/arrow/acero/fetch_node.cc:87–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 sequencing_queue_(util::SequencingQueue::Make(this)) {}
86
87 static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs,
88 const ExecNodeOptions& options) {
89 RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 1, "FetchNode"));
90
91 const auto& fetch_options = checked_cast<const FetchNodeOptions&>(options);
92
93 int64_t offset = fetch_options.offset;
94 int64_t count = fetch_options.count;
95
96 if (offset < 0) {
97 return Status::Invalid("`offset` must be non-negative");
98 }
99 if (count < 0) {
100 return Status::Invalid("`count` must be non-negative");
101 }
102
103 std::shared_ptr<Schema> output_schema = inputs[0]->output_schema();
104 return plan->EmplaceNode<FetchNode>(plan, std::move(inputs), std::move(output_schema),
105 offset, count);
106 }
107
108 const char* kind_name() const override { return "FetchNode"; }
109

Callers

nothing calls this directly

Calls 2

ValidateExecNodeInputsFunction · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected