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

Method MakeExpectedBatch

cpp/src/arrow/dataset/scanner_test.cc:517–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515 TestScannerBase() { internal::Initialize(); }
516
517 std::shared_ptr<RecordBatch> MakeExpectedBatch() {
518 RecordBatchVector batches;
519 for (int frag_idx = 0; frag_idx < GetParam().num_fragments; frag_idx++) {
520 for (int batch_idx = 0; batch_idx < GetParam().num_batches; batch_idx++) {
521 batches.push_back(MakeTestBatch(batch_idx + (frag_idx * GetParam().num_batches)));
522 }
523 }
524 EXPECT_OK_AND_ASSIGN(std::shared_ptr<Table> table,
525 Table::FromRecordBatches(std::move(batches)));
526 EXPECT_OK_AND_ASSIGN(std::shared_ptr<RecordBatch> as_one_batch,
527 table->CombineChunksToBatch());
528 return as_one_batch;
529 }
530
531 acero::Declaration MakeScanNode(std::shared_ptr<Dataset> dataset) {
532 ScanV2Options options(dataset);

Callers

nothing calls this directly

Calls 4

MakeTestBatchFunction · 0.85
EXPECT_OK_AND_ASSIGNFunction · 0.85
push_backMethod · 0.80
CombineChunksToBatchMethod · 0.80

Tested by

no test coverage detected