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

Method Equals

cpp/src/parquet/statistics.cc:752–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750 }
751
752 bool Equals(const Statistics& raw_other) const override {
753 if (physical_type() != raw_other.physical_type()) return false;
754
755 const auto other_logical_type = LogicalTypeId(raw_other);
756 // Only compare against logical types that influence the interpretation of the
757 // physical type
758 if (IsMeaningfulLogicalType(logical_type_)) {
759 if (logical_type_ != other_logical_type) return false;
760 } else if (IsMeaningfulLogicalType(other_logical_type)) {
761 return false;
762 }
763
764 const auto& other = checked_cast<const TypedStatisticsImpl&>(raw_other);
765
766 if (has_min_max_ != other.has_min_max_) return false;
767 if (has_min_max_) {
768 if (!MinMaxEqual(other)) return false;
769 }
770
771 return null_count() == other.null_count() &&
772 distinct_count() == other.distinct_count() &&
773 num_values() == other.num_values() &&
774 is_min_value_exact() == other.is_min_value_exact() &&
775 is_max_value_exact() == other.is_max_value_exact();
776 }
777
778 bool MinMaxEqual(const TypedStatisticsImpl& other) const;
779

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