| 50 | // large page headers) |
| 51 | template <typename H> |
| 52 | static inline void AddDummyStats(int stat_size, H& header, bool fill_all_stats = false) { |
| 53 | std::vector<uint8_t> stat_bytes(stat_size); |
| 54 | // Some non-zero value |
| 55 | std::fill(stat_bytes.begin(), stat_bytes.end(), 1); |
| 56 | header.statistics.__set_max( |
| 57 | std::string(reinterpret_cast<const char*>(stat_bytes.data()), stat_size)); |
| 58 | |
| 59 | if (fill_all_stats) { |
| 60 | header.statistics.__set_min( |
| 61 | std::string(reinterpret_cast<const char*>(stat_bytes.data()), stat_size)); |
| 62 | header.statistics.__set_null_count(42); |
| 63 | header.statistics.__set_distinct_count(1); |
| 64 | } |
| 65 | |
| 66 | header.__isset.statistics = true; |
| 67 | } |
| 68 | |
| 69 | template <typename H> |
| 70 | static inline void CheckStatistics(const H& expected, const EncodedStatistics& actual) { |
no test coverage detected