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

Method GetMinMax

cpp/src/parquet/statistics.cc:536–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534 bool Compare(const T& a, const T& b) const override { return CompareInline(a, b); }
535
536 std::pair<T, T> GetMinMax(const T* values, int64_t length) const override {
537 DCHECK_GT(length, 0);
538
539 T min = Helper::DefaultMin();
540 T max = Helper::DefaultMax();
541
542 for (int64_t i = 0; i < length; i++) {
543 const auto val = SafeLoad(values + i);
544 min = Helper::Min(type_length_, min, Helper::Coalesce(val, Helper::DefaultMin()));
545 max = Helper::Max(type_length_, max, Helper::Coalesce(val, Helper::DefaultMax()));
546 }
547
548 return {min, max};
549 }
550
551 std::pair<T, T> GetMinMaxSpaced(const T* values, int64_t length,
552 const uint8_t* valid_bits,

Callers

nothing calls this directly

Calls 5

NYIFunction · 0.85
MinFunction · 0.50
MaxFunction · 0.50
ToStringMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected