| 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 | |
| 156 | TEST_P(TestCsvFileFormat, BOMQuoteInHeader) { |
no test coverage detected