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

Method GetMinMax

cpp/src/parquet/statistics.cc:498–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496// This does not seem to be required for GetMinMaxSpaced().
497template <>
498std::pair<int32_t, int32_t>
499TypedComparatorImpl</*is_signed=*/false, Int32Type>::GetMinMax(const int32_t* values,
500 int64_t length) const {
501 DCHECK_GT(length, 0);
502
503 const uint32_t* unsigned_values = reinterpret_cast<const uint32_t*>(values);
504 uint32_t min = std::numeric_limits<uint32_t>::max();
505 uint32_t max = std::numeric_limits<uint32_t>::lowest();
506
507 for (int64_t i = 0; i < length; i++) {
508 const auto val = unsigned_values[i];
509 min = std::min<uint32_t>(min, val);
510 max = std::max<uint32_t>(max, val);
511 }
512
513 return {SafeCopy<int32_t>(min), SafeCopy<int32_t>(max)};
514}
515
516template <bool is_signed>
517std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper(

Callers 2

UpdateMethod · 0.45
UpdateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected