| 57 | return table; |
| 58 | } |
| 59 | virtual Future<std::shared_ptr<Table>> ReadAsync() { |
| 60 | auto reader = reader_; |
| 61 | AsyncGenerator<std::shared_ptr<RecordBatch>> gen = [reader] { |
| 62 | return reader->ReadNextAsync(); |
| 63 | }; |
| 64 | return CollectAsyncGenerator(std::move(gen)) |
| 65 | .Then([](const RecordBatchVector& batches) { |
| 66 | return Table::FromRecordBatches(batches); |
| 67 | }); |
| 68 | } |
| 69 | |
| 70 | private: |
| 71 | std::shared_ptr<StreamingReader> reader_; |
no test coverage detected