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

Function AddDummyStats

cpp/src/parquet/file_deserialize_test.cc:52–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50// large page headers)
51template <typename H>
52static 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
69template <typename H>
70static inline void CheckStatistics(const H& expected, const EncodedStatistics& actual) {

Callers 1

TEST_FFunction · 0.85

Calls 7

__set_maxMethod · 0.80
__set_minMethod · 0.80
__set_null_countMethod · 0.80
__set_distinct_countMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected