| 538 | std::shared_ptr<Schema> schema() const override { return schema_; } |
| 539 | |
| 540 | Status ReadNext(std::shared_ptr<RecordBatch>* record_batch) override { |
| 541 | ARROW_ASSIGN_OR_RAISE(auto batch, iterator_.Next()); |
| 542 | if (batch) { |
| 543 | ARROW_ASSIGN_OR_RAISE(*record_batch, batch->ToRecordBatch(schema_, pool_)); |
| 544 | } else { |
| 545 | *record_batch = IterationEnd<std::shared_ptr<RecordBatch>>(); |
| 546 | } |
| 547 | return Status::OK(); |
| 548 | } |
| 549 | |
| 550 | Status Close() override { |
| 551 | // reading from generator until end is reached. |