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

Method GetMinMaxSpaced

cpp/src/parquet/statistics.cc:496–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494 }
495
496 std::pair<T, T> GetMinMaxSpaced(const T* values, int64_t length,
497 const uint8_t* valid_bits,
498 int64_t valid_bits_offset) const override {
499 DCHECK_GT(length, 0);
500
501 T min = Helper::DefaultMin();
502 T max = Helper::DefaultMax();
503
504 ::arrow::internal::VisitSetBitRunsVoid(
505 valid_bits, valid_bits_offset, length, [&](int64_t position, int64_t length) {
506 for (int64_t i = 0; i < length; i++) {
507 const auto val = SafeLoad(values + i + position);
508 min = Helper::Min(type_length_, min,
509 Helper::Coalesce(val, Helper::DefaultMin()));
510 max = Helper::Max(type_length_, max,
511 Helper::Coalesce(val, Helper::DefaultMax()));
512 }
513 });
514
515 return {min, max};
516 }
517
518 std::pair<T, T> GetMinMax(const ::arrow::Array& values) const override {
519 ParquetException::NYI(values.type()->ToString());

Callers 1

UpdateSpacedMethod · 0.80

Calls 3

VisitSetBitRunsVoidFunction · 0.85
MinFunction · 0.50
MaxFunction · 0.50

Tested by

no test coverage detected