Scan the fragment through the scanner.
| 684 | |
| 685 | // Scan the fragment through the scanner. |
| 686 | RecordBatchIterator Batches(std::shared_ptr<Fragment> fragment, |
| 687 | bool use_readahead = true) { |
| 688 | auto dataset = std::make_shared<FragmentDataset>(opts_->dataset_schema, |
| 689 | FragmentVector{fragment}); |
| 690 | ScannerBuilder builder(dataset, opts_); |
| 691 | ARROW_EXPECT_OK(builder.UseThreads(GetParam().use_threads)); |
| 692 | if (!use_readahead) { |
| 693 | ARROW_EXPECT_OK(builder.FragmentReadahead(0)); |
| 694 | ARROW_EXPECT_OK(builder.BatchReadahead(0)); |
| 695 | } |
| 696 | EXPECT_OK_AND_ASSIGN(auto scanner, builder.Finish()); |
| 697 | EXPECT_OK_AND_ASSIGN(auto batch_it, scanner->ScanBatches()); |
| 698 | return MakeMapIterator([](TaggedRecordBatch tagged) { return tagged.record_batch; }, |
| 699 | std::move(batch_it)); |
| 700 | } |
| 701 | |
| 702 | // Scan the fragment directly, without using the scanner. |
| 703 | RecordBatchIterator PhysicalBatches(std::shared_ptr<Fragment> fragment) { |
nothing calls this directly
no test coverage detected