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

Method GetMinMaxSpaced

cpp/src/parquet/statistics.cc:464–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462 }
463
464 std::pair<T, T> GetMinMaxSpaced(const T* values, int64_t length,
465 const uint8_t* valid_bits,
466 int64_t valid_bits_offset) const override {
467 DCHECK_GT(length, 0);
468
469 T min = Helper::DefaultMin();
470 T max = Helper::DefaultMax();
471
472 ::arrow::internal::VisitSetBitRunsVoid(
473 valid_bits, valid_bits_offset, length, [&](int64_t position, int64_t length) {
474 for (int64_t i = 0; i < length; i++) {
475 const auto val = SafeLoad(values + i + position);
476 min = Helper::Min(type_length_, min,
477 Helper::Coalesce(val, Helper::DefaultMin()));
478 max = Helper::Max(type_length_, max,
479 Helper::Coalesce(val, Helper::DefaultMax()));
480 }
481 });
482
483 return {min, max};
484 }
485
486 std::pair<T, T> GetMinMax(const ::arrow::Array& values) const override {
487 ParquetException::NYI(values.type()->ToString());

Callers 1

UpdateSpacedMethod · 0.80

Calls 4

VisitSetBitRunsVoidFunction · 0.85
SafeLoadFunction · 0.85
MinFunction · 0.50
MaxFunction · 0.50

Tested by

no test coverage detected