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

Method UpdateLevelHistogram

cpp/src/parquet/column_writer.cc:1803–1824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1801 }
1802
1803 void UpdateLevelHistogram(int64_t num_levels, const int16_t* def_levels,
1804 const int16_t* rep_levels) const {
1805 if (page_size_statistics_ == nullptr) {
1806 return;
1807 }
1808
1809 auto add_levels = [](std::vector<int64_t>& level_histogram,
1810 std::span<const int16_t> levels, int16_t max_level) {
1811 if (max_level == 0) {
1812 return;
1813 }
1814 ARROW_DCHECK_EQ(static_cast<size_t>(max_level) + 1, level_histogram.size());
1815 ::parquet::UpdateLevelHistogram(levels, level_histogram);
1816 };
1817
1818 add_levels(page_size_statistics_->definition_level_histogram,
1819 {def_levels, static_cast<size_t>(num_levels)},
1820 descr_->max_definition_level());
1821 add_levels(page_size_statistics_->repetition_level_histogram,
1822 {rep_levels, static_cast<size_t>(num_levels)},
1823 descr_->max_repetition_level());
1824 }
1825
1826 // Update the unencoded data bytes for ByteArray only per the specification.
1827 void UpdateUnencodedDataBytes() const {

Callers

nothing calls this directly

Calls 2

UpdateLevelHistogramFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected