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

Function TestRecordBatchReaderSourceSink

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

Source from the content-addressed store, hash-verified

327}
328
329void 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
345void TestRecordBatchReaderSourceSinkError(
346 std::function<Result<std::shared_ptr<RecordBatchReader>>(const BatchesWithSchema&)>

Callers 1

TESTFunction · 0.85

Calls 3

MakeBasicBatchesFunction · 0.70
ASSERT_OK_AND_ASSIGNFunction · 0.70

Tested by

no test coverage detected