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

Method CheckScannedBatches

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

Source from the content-addressed store, hash-verified

548 }
549
550 void CheckScannedBatches(RecordBatchVector batches) {
551 ASSERT_OK_AND_ASSIGN(std::shared_ptr<Table> batches_as_table,
552 Table::FromRecordBatches(std::move(batches)));
553 ASSERT_OK_AND_ASSIGN(std::shared_ptr<RecordBatch> combined_data,
554 batches_as_table->CombineChunksToBatch());
555
556 ASSERT_OK_AND_ASSIGN(
557 std::shared_ptr<Array> sort_indices,
558 compute::SortIndices(combined_data->column(0), compute::SortOptions{}));
559 ASSERT_OK_AND_ASSIGN(Datum sorted_data, compute::Take(combined_data, sort_indices));
560
561 std::shared_ptr<RecordBatch> expected_data = MakeExpectedBatch();
562 AssertBatchesEqual(*expected_data, *sorted_data.record_batch());
563 }
564
565 void CheckScanner(bool ordered) {
566 std::shared_ptr<MockDataset> mock_dataset =

Callers

nothing calls this directly

Calls 5

SortIndicesFunction · 0.85
AssertBatchesEqualFunction · 0.85
CombineChunksToBatchMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.70
columnMethod · 0.45

Tested by

no test coverage detected