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

Method Merge

cpp/src/parquet/size_statistics.cc:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42} // namespace
43
44void SizeStatistics::Merge(const SizeStatistics& other) {
45 if (repetition_level_histogram.size() != other.repetition_level_histogram.size()) {
46 throw ParquetException("Repetition level histogram size mismatch");
47 }
48 if (definition_level_histogram.size() != other.definition_level_histogram.size()) {
49 throw ParquetException("Definition level histogram size mismatch");
50 }
51 if (unencoded_byte_array_data_bytes.has_value() !=
52 other.unencoded_byte_array_data_bytes.has_value()) {
53 throw ParquetException("Unencoded byte array data bytes are not consistent");
54 }
55 MergeLevelHistogram(repetition_level_histogram, other.repetition_level_histogram);
56 MergeLevelHistogram(definition_level_histogram, other.definition_level_histogram);
57 if (unencoded_byte_array_data_bytes.has_value()) {
58 unencoded_byte_array_data_bytes = unencoded_byte_array_data_bytes.value() +
59 other.unencoded_byte_array_data_bytes.value();
60 }
61}
62
63void SizeStatistics::IncrementUnencodedByteArrayDataBytes(int64_t value) {
64 ARROW_CHECK(unencoded_byte_array_data_bytes.has_value());

Callers 6

AddKeyValueMetadataMethod · 0.45
TestMergeMethod · 0.45
MergeDistinctCountMethod · 0.45
MergedStatisticsMethod · 0.45
ResetPageStatisticsMethod · 0.45
AddKeyValueMetadataMethod · 0.45

Calls 4

ParquetExceptionFunction · 0.85
MergeLevelHistogramFunction · 0.85
sizeMethod · 0.45
valueMethod · 0.45

Tested by 3

TestMergeMethod · 0.36
MergeDistinctCountMethod · 0.36
MergedStatisticsMethod · 0.36