Return a batch iterator which scans the fragment through the scanner. For interface compatibility with `FileFormatScanMixin`
| 1278 | // |
| 1279 | // For interface compatibility with `FileFormatScanMixin` |
| 1280 | RecordBatchIterator Batches(const std::shared_ptr<Fragment>& fragment, |
| 1281 | bool use_readahead = true) { |
| 1282 | if (!use_readahead) { |
| 1283 | opts_->target_bytes_readahead = 0; |
| 1284 | opts_->fragment_readahead = 0; |
| 1285 | } |
| 1286 | EXPECT_OK_AND_ASSIGN(auto reader, this->Scan(fragment)); |
| 1287 | struct ReaderIterator { |
| 1288 | Result<std::shared_ptr<RecordBatch>> Next() { return reader->Next(); } |
| 1289 | std::unique_ptr<RecordBatchReader> reader; |
| 1290 | }; |
| 1291 | return RecordBatchIterator(ReaderIterator{std::move(reader)}); |
| 1292 | } |
| 1293 | |
| 1294 | // Shared test cases |
| 1295 | void TestScan() { |
nothing calls this directly
no test coverage detected