| 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 |
nothing calls this directly
no test coverage detected