| 343 | } |
| 344 | |
| 345 | void TestRecordBatchReaderSourceSinkError( |
| 346 | std::function<Result<std::shared_ptr<RecordBatchReader>>(const BatchesWithSchema&)> |
| 347 | to_reader) { |
| 348 | ASSERT_OK_AND_ASSIGN(auto plan, ExecPlan::Make()); |
| 349 | auto source_factory_name = "record_batch_reader_source"; |
| 350 | auto exp_batches = MakeBasicBatches(); |
| 351 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<RecordBatchReader> reader, to_reader(exp_batches)); |
| 352 | |
| 353 | auto null_executor_options = RecordBatchReaderSourceNodeOptions{reader}; |
| 354 | ASSERT_OK(MakeExecNode(source_factory_name, plan.get(), {}, null_executor_options)); |
| 355 | |
| 356 | std::shared_ptr<RecordBatchReader> no_reader; |
| 357 | auto null_reader_options = RecordBatchReaderSourceNodeOptions{no_reader}; |
| 358 | ASSERT_THAT(MakeExecNode(source_factory_name, plan.get(), {}, null_reader_options), |
| 359 | Raises(StatusCode::Invalid, HasSubstr("not null"))); |
| 360 | } |
| 361 | |
| 362 | TEST(ExecPlanExecution, ArrayVectorSourceSink) { |
| 363 | TestSourceSink<std::shared_ptr<ArrayVector>, ArrayVectorSourceNodeOptions>( |
no test coverage detected