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

Method Equals

cpp/src/parquet/statistics.cc:665–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663 }
664
665 bool Equals(const Statistics& raw_other) const override {
666 if (physical_type() != raw_other.physical_type()) return false;
667
668 const auto other_logical_type = LogicalTypeId(raw_other);
669 // Only compare against logical types that influence the interpretation of the
670 // physical type
671 if (IsMeaningfulLogicalType(logical_type_)) {
672 if (logical_type_ != other_logical_type) return false;
673 } else if (IsMeaningfulLogicalType(other_logical_type)) {
674 return false;
675 }
676
677 const auto& other = checked_cast<const TypedStatisticsImpl&>(raw_other);
678
679 if (has_min_max_ != other.has_min_max_) return false;
680 if (has_min_max_) {
681 if (!MinMaxEqual(other)) return false;
682 }
683
684 return null_count() == other.null_count() &&
685 distinct_count() == other.distinct_count() &&
686 num_values() == other.num_values() &&
687 is_min_value_exact() == other.is_min_value_exact() &&
688 is_max_value_exact() == other.is_max_value_exact();
689 }
690
691 bool MinMaxEqual(const TypedStatisticsImpl& other) const;
692

Callers

nothing calls this directly

Calls 10

physical_typeFunction · 0.85
LogicalTypeIdFunction · 0.85
num_valuesFunction · 0.85
physical_typeMethod · 0.80
is_min_value_exactMethod · 0.80
is_max_value_exactMethod · 0.80
null_countFunction · 0.70
null_countMethod · 0.45
distinct_countMethod · 0.45
num_valuesMethod · 0.45

Tested by

no test coverage detected