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

Method Make

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

Source from the content-addressed store, hash-verified

164 }
165
166 static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs,
167 const ExecNodeOptions& options) {
168 RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 1, "PivotLongerNode"));
169
170 const auto& pivot_options = checked_cast<const PivotLongerNodeOptions&>(options);
171
172 std::vector<BoundRowTemplate> templates;
173 for (const auto& row_template : pivot_options.row_templates) {
174 ARROW_ASSIGN_OR_RAISE(
175 BoundRowTemplate bound_template,
176 BoundRowTemplate::Make(row_template, *inputs[0]->output_schema()));
177 templates.push_back(std::move(bound_template));
178 }
179
180 ARROW_ASSIGN_OR_RAISE(
181 std::shared_ptr<Schema> output_schema,
182 PivotLongerNode::MakeOutputSchema(pivot_options, inputs[0]->output_schema()));
183 return plan->EmplaceNode<PivotLongerNode>(plan, std::move(inputs),
184 std::move(output_schema), pivot_options,
185 std::move(templates));
186 }
187
188 const char* kind_name() const override { return "PivotLongerNode"; }
189

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