| 327 | } |
| 328 | |
| 329 | void TestRecordBatchReaderSourceSink( |
| 330 | std::function<Result<std::shared_ptr<RecordBatchReader>>(const BatchesWithSchema&)> |
| 331 | to_reader) { |
| 332 | for (bool parallel : {false, true}) { |
| 333 | SCOPED_TRACE(parallel ? "parallel/merged" : "serial"); |
| 334 | auto exp_batches = MakeBasicBatches(); |
| 335 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<RecordBatchReader> reader, |
| 336 | to_reader(exp_batches)); |
| 337 | RecordBatchReaderSourceNodeOptions options{reader}; |
| 338 | Declaration plan("record_batch_reader_source", std::move(options)); |
| 339 | ASSERT_OK_AND_ASSIGN(auto result, DeclarationToExecBatches(plan, parallel)); |
| 340 | AssertExecBatchesEqualIgnoringOrder(result.schema, result.batches, |
| 341 | exp_batches.batches); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | void TestRecordBatchReaderSourceSinkError( |
| 346 | std::function<Result<std::shared_ptr<RecordBatchReader>>(const BatchesWithSchema&)> |
no test coverage detected