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