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

Method Make

cpp/src/parquet/size_statistics.cc:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101std::unique_ptr<SizeStatistics> SizeStatistics::Make(const ColumnDescriptor* descr) {
102 auto size_stats = std::make_unique<SizeStatistics>();
103 // If the max level is 0, the level histogram can be omitted because it contains
104 // only single level (a.k.a. 0) and its count is equivalent to `num_values` of the
105 // column chunk or data page.
106 if (descr->max_repetition_level() != 0) {
107 size_stats->repetition_level_histogram.resize(descr->max_repetition_level() + 1, 0);
108 }
109 if (descr->max_definition_level() != 0) {
110 size_stats->definition_level_histogram.resize(descr->max_definition_level() + 1, 0);
111 }
112 if (descr->physical_type() == Type::BYTE_ARRAY) {
113 size_stats->unencoded_byte_array_data_bytes = 0;
114 }
115 return size_stats;
116}
117
118std::ostream& operator<<(std::ostream& os, const SizeStatistics& size_stats) {
119 constexpr std::string_view kComma = ", ";

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
physical_typeMethod · 0.80

Tested by

no test coverage detected