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

Function min_of_bounds

datafusion/expr-common/src/interval_arithmetic.rs:1355–1361  ·  view source on GitHub ↗

Returns the lesser of the given interval bounds. Assumes that a `NULL` value represents `INF`.

(first: &ScalarValue, second: &ScalarValue)

Source from the content-addressed store, hash-verified

1353/// Returns the lesser of the given interval bounds. Assumes that a `NULL`
1354/// value represents `INF`.
1355fn min_of_bounds(first: &ScalarValue, second: &ScalarValue) -> ScalarValue {
1356 if !first.is_null() && (second.is_null() || first <= second) {
1357 first.clone()
1358 } else {
1359 second.clone()
1360 }
1361}
1362
1363/// This function updates the given intervals by enforcing (i.e. propagating)
1364/// the inequality `left > right` (or the `left >= right` inequality, if `strict`

Callers 2

intersectMethod · 0.85

Calls 2

is_nullMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…