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

Method DefaultMin

cpp/src/parquet/statistics.cc:94–100  ·  view source on GitHub ↗

For floating point, seed the running min/max with +/-infinity rather than the largest/smallest finite value: a finite seed is not an identity for min/max once the data contains infinities, so an all-+Inf (resp. all--Inf) column would otherwise never displace the seed and report a finite bound.

Source from the content-addressed store, hash-verified

92 // min/max once the data contains infinities, so an all-+Inf (resp. all--Inf)
93 // column would otherwise never displace the seed and report a finite bound.
94 constexpr static T DefaultMin() {
95 if constexpr (std::is_floating_point_v<T>) {
96 return std::numeric_limits<T>::infinity();
97 } else {
98 return std::numeric_limits<T>::max();
99 }
100 }
101 constexpr static T DefaultMax() {
102 if constexpr (std::is_floating_point_v<T>) {
103 return -std::numeric_limits<T>::infinity();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected