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

Function decimal128_ceil_precision

datafusion/spark/src/function/math/ceil.rs:120–122  ·  view source on GitHub ↗
(precision: u8, scale: i8)

Source from the content-addressed store, hash-verified

118/// Compute the return precision for a decimal128 ceil result.
119#[inline]
120fn decimal128_ceil_precision(precision: u8, scale: i8) -> u8 {
121 ((precision as i64) - (scale as i64) + 1).clamp(1, 38) as u8
122}
123
124fn spark_ceil_scalar(value: &ScalarValue) -> Result<ColumnarValue> {
125 let result = match value {

Callers 3

return_typeMethod · 0.85
spark_ceil_scalarFunction · 0.85
spark_ceil_arrayFunction · 0.85

Calls 1

clampMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…