| 450 | } |
| 451 | |
| 452 | bool CheckEnded() { |
| 453 | bool all_finished = true; |
| 454 | for (const auto& s : state) { |
| 455 | all_finished &= s->Finished(); |
| 456 | } |
| 457 | if (all_finished) { |
| 458 | EndFromProcessThread(); |
| 459 | return false; |
| 460 | } |
| 461 | return true; |
| 462 | } |
| 463 | |
| 464 | /// Streams the input states in sorted order until we run out of input |
| 465 | arrow::Result<std::shared_ptr<arrow::RecordBatch>> getNextBatch() { |