| 700 | } |
| 701 | |
| 702 | void Merge(const TypedStatistics<DType>& other) override { |
| 703 | this->num_values_ += other.num_values(); |
| 704 | // null_count is always valid when merging page statistics into |
| 705 | // column chunk statistics. |
| 706 | if (other.HasNullCount()) { |
| 707 | this->statistics_.null_count += other.null_count(); |
| 708 | } else { |
| 709 | this->has_null_count_ = false; |
| 710 | } |
| 711 | if (has_distinct_count_ && other.HasDistinctCount() && |
| 712 | (distinct_count() == 0 || other.distinct_count() == 0)) { |
| 713 | // We can merge distinct counts if either side is zero. |
| 714 | statistics_.distinct_count = |
| 715 | std::max(statistics_.distinct_count, other.distinct_count()); |
| 716 | } else { |
| 717 | // Otherwise clear has_distinct_count_ as distinct count cannot be merged. |
| 718 | this->has_distinct_count_ = false; |
| 719 | } |
| 720 | // Do not clear min/max here if the other side does not provide |
| 721 | // min/max which may happen when other is an empty stats or all |
| 722 | // its values are null and/or NaN. |
| 723 | if (other.HasMinMax()) { |
| 724 | SetMinMax(other.min(), other.max()); |
| 725 | } |
| 726 | } |
| 727 | |
| 728 | void Update(const T* values, int64_t num_values, int64_t null_count) override; |
| 729 | void UpdateSpaced(const T* values, const uint8_t* valid_bits, int64_t valid_bits_offset, |
nothing calls this directly
no test coverage detected