| 60 | const char* kind_name() const override { return "UnionNode"; } |
| 61 | |
| 62 | static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs, |
| 63 | const ExecNodeOptions& options) { |
| 64 | RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, static_cast<int>(inputs.size()), |
| 65 | "UnionNode")); |
| 66 | if (inputs.size() < 1) { |
| 67 | return Status::Invalid("Constructing a `UnionNode` with inputs size less than 1"); |
| 68 | } |
| 69 | auto schema = inputs.at(0)->output_schema(); |
| 70 | for (auto input : inputs) { |
| 71 | if (!input->output_schema()->Equals(schema)) { |
| 72 | return Status::Invalid( |
| 73 | "UnionNode input schemas must all match, first schema was: ", |
| 74 | schema->ToString(), " got schema: ", input->output_schema()->ToString()); |
| 75 | } |
| 76 | } |
| 77 | return plan->EmplaceNode<UnionNode>(plan, std::move(inputs)); |
| 78 | } |
| 79 | |
| 80 | Status InputReceived(ExecNode* input, ExecBatch batch) override { |
| 81 | NoteInputReceived(batch); |
nothing calls this directly
no test coverage detected