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