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

Function decimal128_ceil

datafusion/spark/src/function/math/ceil.rs:111–116  ·  view source on GitHub ↗
(value: i128, scale: u32)

Source from the content-addressed store, hash-verified

109/// Compute ceil for a single decimal128 value with the given scale.
110#[inline]
111fn decimal128_ceil(value: i128, scale: u32) -> i128 {
112 let div = 10_i128.pow_wrapping(scale);
113 let d = value / div;
114 let r = value % div;
115 if r > 0 { d + 1 } else { d }
116}
117
118/// Compute the return precision for a decimal128 ceil result.
119#[inline]

Callers 2

spark_ceil_scalarFunction · 0.85
spark_ceil_arrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…