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

Method InputFinished

cpp/src/arrow/acero/fetch_node.cc:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 const Ordering& ordering() const override { return inputs_[0]->ordering(); }
111
112 Status InputFinished(ExecNode* input, int total_batches) override {
113 DCHECK_EQ(input, inputs_[0]);
114 EVENT_ON_CURRENT_SPAN("InputFinished", {{"batches.length", total_batches}});
115 // Normally we will finish in InputFinished because we sent count_ rows. However, it
116 // is possible that the input does not contain count_ rows and so we have to end from
117 // here
118 if (in_batch_counter_.SetTotal(total_batches)) {
119 if (!finished_) {
120 finished_ = true;
121 ARROW_RETURN_NOT_OK(inputs_[0]->StopProducing());
122 ARROW_RETURN_NOT_OK(output_->InputFinished(this, out_batch_count_));
123 }
124 }
125 return Status::OK();
126 }
127
128 Status Validate() const override {
129 ARROW_RETURN_NOT_OK(ExecNode::Validate());

Callers 1

ProcessMethod · 0.45

Calls 2

OKFunction · 0.50
StopProducingMethod · 0.45

Tested by

no test coverage detected