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

Method Make

cpp/src/arrow/acero/pivot_longer_node.cc:189–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 }
188
189 static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs,
190 const ExecNodeOptions& options) {
191 RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 1, "PivotLongerNode"));
192
193 const auto& pivot_options = checked_cast<const PivotLongerNodeOptions&>(options);
194
195 std::vector<BoundRowTemplate> templates;
196 for (const auto& row_template : pivot_options.row_templates) {
197 ARROW_ASSIGN_OR_RAISE(
198 BoundRowTemplate bound_template,
199 BoundRowTemplate::Make(row_template, *inputs[0]->output_schema()));
200 templates.push_back(std::move(bound_template));
201 }
202
203 ARROW_ASSIGN_OR_RAISE(
204 std::shared_ptr<Schema> output_schema,
205 PivotLongerNode::MakeOutputSchema(pivot_options, inputs[0]->output_schema()));
206 return plan->EmplaceNode<PivotLongerNode>(plan, std::move(inputs),
207 std::move(output_schema), pivot_options,
208 std::move(templates));
209 }
210
211 const char* kind_name() const override { return "PivotLongerNode"; }
212

Callers

nothing calls this directly

Calls 4

ValidateExecNodeInputsFunction · 0.85
push_backMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
MakeOutputSchemaFunction · 0.70

Tested by

no test coverage detected