| 380 | |
| 381 | template <> |
| 382 | void PageFilterTest<format::DataPageHeader>::WriteStream() { |
| 383 | for (int i = 0; i < kNumPages; ++i) { |
| 384 | // Vary the number of rows to produce different headers. |
| 385 | int32_t num_rows = i + 100; |
| 386 | total_rows_ += num_rows; |
| 387 | int data_size = i + 1024; |
| 388 | this->data_page_header_.__set_num_values(num_rows); |
| 389 | this->data_page_header_.statistics.__set_min_value("A" + std::to_string(i)); |
| 390 | this->data_page_header_.statistics.__set_max_value("Z" + std::to_string(i)); |
| 391 | this->data_page_header_.statistics.__set_null_count(0); |
| 392 | this->data_page_header_.statistics.__set_distinct_count(num_rows); |
| 393 | this->data_page_header_.__isset.statistics = true; |
| 394 | ASSERT_NO_FATAL_FAILURE( |
| 395 | this->WriteDataPageHeader(/*max_serialized_len=*/1024, data_size, data_size)); |
| 396 | data_page_headers_.push_back(this->data_page_header_); |
| 397 | // Also write data, to make sure we skip the data correctly. |
| 398 | std::vector<uint8_t> faux_data(data_size); |
| 399 | ASSERT_OK(this->out_stream_->Write(faux_data.data(), data_size)); |
| 400 | } |
| 401 | this->EndStream(); |
| 402 | } |
| 403 | |
| 404 | template <> |
| 405 | void PageFilterTest<format::DataPageHeaderV2>::WriteStream() { |
no test coverage detected