Shared test cases
| 1293 | |
| 1294 | // Shared test cases |
| 1295 | void TestScan() { |
| 1296 | // Basic test to make sure we can scan data |
| 1297 | auto random_data = GetRandomData(schema({field("f64", float64())})); |
| 1298 | auto source = this->MakeBufferSource(random_data.get()); |
| 1299 | |
| 1300 | this->SetDatasetSchema(random_data->schema()->fields()); |
| 1301 | auto fragment = this->MakeFragment(*source); |
| 1302 | |
| 1303 | int64_t row_count = 0; |
| 1304 | ASSERT_OK_AND_ASSIGN(std::unique_ptr<RecordBatchReader> scanner, Scan(fragment)); |
| 1305 | for (auto maybe_batch : *scanner) { |
| 1306 | ASSERT_OK_AND_ASSIGN(auto batch, maybe_batch); |
| 1307 | row_count += batch->num_rows(); |
| 1308 | } |
| 1309 | ASSERT_EQ(row_count, GetParam().expected_rows()); |
| 1310 | } |
| 1311 | |
| 1312 | // TestScanBatchSize is no longer relevant because batch size is an internal concern. |
| 1313 | // Consumers should only really care about batch sizing at the sink. |
nothing calls this directly
no test coverage detected