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

Method GetMinMax

cpp/src/parquet/statistics.cc:530–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528// This does not seem to be required for GetMinMaxSpaced().
529template <>
530std::pair<int32_t, int32_t>
531TypedComparatorImpl</*is_signed=*/false, Int32Type>::GetMinMax(const int32_t* values,
532 int64_t length) const {
533 DCHECK_GT(length, 0);
534
535 const uint32_t* unsigned_values = reinterpret_cast<const uint32_t*>(values);
536 uint32_t min = std::numeric_limits<uint32_t>::max();
537 uint32_t max = std::numeric_limits<uint32_t>::lowest();
538
539 for (int64_t i = 0; i < length; i++) {
540 const auto val = unsigned_values[i];
541 min = std::min<uint32_t>(min, val);
542 max = std::max<uint32_t>(max, val);
543 }
544
545 return {SafeCopy<int32_t>(min), SafeCopy<int32_t>(max)};
546}
547
548template <bool is_signed>
549std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper(

Callers 2

UpdateMethod · 0.45
UpdateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected