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