| 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 |
nothing calls this directly
no test coverage detected