Scan the fragment through the scanner.
| 1261 | |
| 1262 | // Scan the fragment through the scanner. |
| 1263 | Result<std::unique_ptr<RecordBatchReader>> Scan(std::shared_ptr<Fragment> fragment, |
| 1264 | bool add_filter_fields = true) { |
| 1265 | opts_->dataset = |
| 1266 | std::make_shared<FragmentDataset>(dataset_schema_, FragmentVector{fragment}); |
| 1267 | if (add_filter_fields) { |
| 1268 | ARROW_RETURN_NOT_OK(ScanV2Options::AddFieldsNeededForFilter(opts_.get())); |
| 1269 | } |
| 1270 | opts_->format_options = GetFormatOptions(); |
| 1271 | ARROW_ASSIGN_OR_RAISE(std::unique_ptr<RecordBatchReader> reader, |
| 1272 | acero::DeclarationToReader(acero::Declaration("scan2", *opts_), |
| 1273 | GetParam().use_threads)); |
| 1274 | return reader; |
| 1275 | } |
| 1276 | |
| 1277 | // Return a batch iterator which scans the fragment through the scanner. |
| 1278 | // |
no test coverage detected