MCPcopy Create free account
hub / github.com/apache/datafusion / min

Method min

datafusion/common/src/stats.rs:117–129  ·  view source on GitHub ↗

Returns the minimum of two (possibly inexact) values, conservatively propagating exactness information. If one of the input values is [`Precision::Absent`], the result is `Absent` too.

(&self, other: &Precision<T>)

Source from the content-addressed store, hash-verified

115 /// propagating exactness information. If one of the input values is
116 /// [`Precision::Absent`], the result is `Absent` too.
117 pub fn min(&self, other: &Precision<T>) -> Precision<T> {
118 match (self, other) {
119 (Precision::Exact(a), Precision::Exact(b)) => {
120 Precision::Exact(if a >= b { b.clone() } else { a.clone() })
121 }
122 (Precision::Inexact(a), Precision::Exact(b))
123 | (Precision::Exact(a), Precision::Inexact(b))
124 | (Precision::Inexact(a), Precision::Inexact(b)) => {
125 Precision::Inexact(if a >= b { b.clone() } else { a.clone() })
126 }
127 (_, _) => Precision::Absent,
128 }
129 }
130
131 /// Demotes the precision state from exact to inexact (if present).
132 pub fn to_inexact(self) -> Self {

Callers 15

nextMethod · 0.45
add_fileMethod · 0.45
max_rowsMethod · 0.45
return_typeMethod · 0.45
create_decimal32_typeFunction · 0.45
create_decimal64_typeFunction · 0.45
create_decimal128_typeFunction · 0.45
create_decimal256_typeFunction · 0.45
create_args_with_countFunction · 0.45
format_strMethod · 0.45
return_typeMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by 7

return_typeMethod · 0.36
generate_random_queryMethod · 0.36