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

Method TestScan

cpp/src/arrow/dataset/test_util_internal.h:711–724  ·  view source on GitHub ↗

Shared test cases

Source from the content-addressed store, hash-verified

709
710 // Shared test cases
711 void TestScan() {
712 auto reader = GetRecordBatchReader(schema({field("f64", float64())}));
713 auto source = this->GetFileSource(reader.get());
714
715 this->SetSchema(reader->schema()->fields());
716 auto fragment = this->MakeFragment(*source);
717
718 int64_t row_count = 0;
719 for (auto maybe_batch : Batches(fragment)) {
720 ASSERT_OK_AND_ASSIGN(auto batch, maybe_batch);
721 row_count += batch->num_rows();
722 }
723 ASSERT_EQ(row_count, GetParam().expected_rows());
724 }
725 // Ensure batch_size is respected
726 void TestScanBatchSize() {
727 constexpr int kBatchSize = 17;

Callers 1

Calls 11

schemaFunction · 0.50
fieldFunction · 0.50
BatchesFunction · 0.50
GetFileSourceMethod · 0.45
getMethod · 0.45
SetSchemaMethod · 0.45
fieldsMethod · 0.45
schemaMethod · 0.45
MakeFragmentMethod · 0.45
num_rowsMethod · 0.45
expected_rowsMethod · 0.45

Tested by

no test coverage detected