Function arrow_arith::arithmetic::subtract_scalar_checked
source · pub fn subtract_scalar_checked<T>(
array: &PrimitiveArray<T>,
scalar: T::Native
) -> Result<PrimitiveArray<T>, ArrowError>where
T: ArrowNumericType,
T::Native: ArrowNativeTypeOp,
Expand description
Subtract every value in an array by a scalar. If any value in the array is null then the result is also null.
This detects overflow and returns an Err
for that. For an non-overflow-checking variant,
use subtract_scalar
instead.