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