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

Method Batches

cpp/src/arrow/dataset/file_csv_test.cc:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 }
135
136 RecordBatchIterator Batches(const std::shared_ptr<Fragment>& fragment) {
137 if (UseScanV2()) {
138 ScanV2Options v2_options = MigrateLegacyOptions(fragment);
139 EXPECT_TRUE(ScanV2Options::AddFieldsNeededForFilter(&v2_options).ok());
140 EXPECT_OK_AND_ASSIGN(
141 std::unique_ptr<RecordBatchReader> reader,
142 acero::DeclarationToReader(acero::Declaration("scan2", std::move(v2_options)),
143 /*use_threads=*/false));
144 struct ReaderIterator {
145 Result<std::shared_ptr<RecordBatch>> Next() { return reader->Next(); }
146 std::unique_ptr<RecordBatchReader> reader;
147 };
148 return RecordBatchIterator(ReaderIterator{std::move(reader)});
149 } else {
150 EXPECT_OK_AND_ASSIGN(auto batch_gen, fragment->ScanBatchesAsync(opts_));
151 return MakeGeneratorIterator(batch_gen);
152 }
153 }
154};
155
156TEST_P(TestCsvFileFormat, BOMQuoteInHeader) {

Callers 3

TestScanWithBOMMethod · 0.45

Calls 6

EXPECT_OK_AND_ASSIGNFunction · 0.85
DeclarationToReaderFunction · 0.85
MakeGeneratorIteratorFunction · 0.85
DeclarationClass · 0.50
RecordBatchIteratorClass · 0.50
okMethod · 0.45

Tested by

no test coverage detected