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

Function GetMinMax

cpp/src/arrow/compute/kernels/util_internal.h:73–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72template <typename T>
73std::pair<T, T> GetMinMax(const ChunkedArray& arr) {
74 T min = std::numeric_limits<T>::max();
75 T max = std::numeric_limits<T>::lowest();
76
77 for (const auto& chunk : arr.chunks()) {
78 T local_min, local_max;
79 std::tie(local_min, local_max) = GetMinMax<T>(*chunk->data());
80 min = std::min(min, local_min);
81 max = std::max(max, local_max);
82 }
83
84 return std::make_pair(min, max);
85}
86
87// Count value occurrences of an array, ignore nulls.
88// 'counts' must be zeroed and with enough size.

Callers

nothing calls this directly

Calls 2

chunksMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected