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

Method StartProducing

cpp/src/arrow/acero/sink_node.cc:326–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324 const char* kind_name() const override { return "ConsumingSinkNode"; }
325
326 Status StartProducing() override {
327 NoteStartProducing(ToStringExtra());
328 DCHECK_GT(inputs_.size(), 0);
329 auto output_schema = inputs_[0]->output_schema();
330 if (names_.size() > 0) {
331 int num_fields = output_schema->num_fields();
332 if (names_.size() != static_cast<size_t>(num_fields)) {
333 return Status::Invalid(
334 "A plan was created with custom field names but the number of names did not "
335 "match the number of output columns");
336 }
337 ARROW_ASSIGN_OR_RAISE(output_schema, output_schema->WithNames(names_));
338 }
339 RETURN_NOT_OK(consumer_->Init(output_schema, this, plan_));
340 return Status::OK();
341 }
342
343 Status Validate() const override {
344 ARROW_RETURN_NOT_OK(ExecNode::Validate());

Callers

nothing calls this directly

Calls 7

WithNamesMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
InvalidFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45
num_fieldsMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected