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

Method Equals

cpp/src/parquet/statistics.cc:697–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695 }
696
697 bool Equals(const Statistics& raw_other) const override {
698 if (physical_type() != raw_other.physical_type()) return false;
699
700 const auto other_logical_type = LogicalTypeId(raw_other);
701 // Only compare against logical types that influence the interpretation of the
702 // physical type
703 if (IsMeaningfulLogicalType(logical_type_)) {
704 if (logical_type_ != other_logical_type) return false;
705 } else if (IsMeaningfulLogicalType(other_logical_type)) {
706 return false;
707 }
708
709 const auto& other = checked_cast<const TypedStatisticsImpl&>(raw_other);
710
711 if (has_min_max_ != other.has_min_max_) return false;
712 if (has_min_max_) {
713 if (!MinMaxEqual(other)) return false;
714 }
715
716 return null_count() == other.null_count() &&
717 distinct_count() == other.distinct_count() &&
718 num_values() == other.num_values() &&
719 is_min_value_exact() == other.is_min_value_exact() &&
720 is_max_value_exact() == other.is_max_value_exact();
721 }
722
723 bool MinMaxEqual(const TypedStatisticsImpl& other) const;
724

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