| 70 | const Ordering& ordering() const override { return ordering_; } |
| 71 | |
| 72 | Status InputFinished(ExecNode* input, int total_batches) override { |
| 73 | DCHECK_EQ(input, inputs_[0]); |
| 74 | EVENT_ON_CURRENT_SPAN("InputFinished", {{"batches.length", total_batches}}); |
| 75 | // We can't send InputFinished downstream because we might change the # of batches |
| 76 | // when we sort it. So that happens later in DoFinish |
| 77 | if (counter_.SetTotal(total_batches)) { |
| 78 | return DoFinish(); |
| 79 | } |
| 80 | return Status::OK(); |
| 81 | } |
| 82 | |
| 83 | Status StartProducing() override { |
| 84 | NoteStartProducing(ToStringExtra()); |