MCPcopy Create free account
hub / github.com/apache/arrow / Batches

Method Batches

cpp/src/arrow/dataset/test_util_internal.h:686–700  ·  view source on GitHub ↗

Scan the fragment through the scanner.

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 4

MakeMapIteratorFunction · 0.85
FragmentReadaheadMethod · 0.80
BatchReadaheadMethod · 0.80
UseThreadsMethod · 0.45

Tested by

no test coverage detected