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