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

Method Make

cpp/src/arrow/acero/union_node.cc:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

ValidateExecNodeInputsFunction · 0.85
InvalidFunction · 0.50
sizeMethod · 0.45
EqualsMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected