| 789 | // Base record batch reader |
| 790 | |
| 791 | Result<RecordBatchVector> RecordBatchReader::ToRecordBatches() { |
| 792 | RecordBatchVector batches; |
| 793 | while (true) { |
| 794 | std::shared_ptr<RecordBatch> batch; |
| 795 | RETURN_NOT_OK(ReadNext(&batch)); |
| 796 | if (!batch) { |
| 797 | break; |
| 798 | } |
| 799 | batches.emplace_back(std::move(batch)); |
| 800 | } |
| 801 | return batches; |
| 802 | } |
| 803 | |
| 804 | Result<std::shared_ptr<Table>> RecordBatchReader::ToTable() { |
| 805 | ARROW_ASSIGN_OR_RAISE(auto batches, ToRecordBatches()); |
nothing calls this directly
no test coverage detected