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

Method Batches

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

Return a batch iterator which scans the fragment through the scanner. For interface compatibility with `FileFormatScanMixin`

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

RecordBatchIteratorClass · 0.50

Tested by

no test coverage detected