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

Function TestRecordBatchReaderSourceSinkError

cpp/src/arrow/acero/plan_test.cc:345–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345void 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
362TEST(ExecPlanExecution, ArrayVectorSourceSink) {
363 TestSourceSink<std::shared_ptr<ArrayVector>, ArrayVectorSourceNodeOptions>(

Callers 1

TESTFunction · 0.85

Calls 5

MakeExecNodeFunction · 0.85
RaisesFunction · 0.85
MakeBasicBatchesFunction · 0.70
ASSERT_OK_AND_ASSIGNFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected