pub fn add_scalar_checked_dyn<T>(
    array: &dyn Array,
    scalar: <T as ArrowPrimitiveType>::Native
) -> Result<Arc<dyn Array + 'static>, ArrowError>where
    T: ArrowNumericType,
    <T as ArrowPrimitiveType>::Native: ArrowNativeTypeOp,
Expand description

Add every value in an array by a scalar. If any value in the array is null then the result is also null. The given array must be a PrimitiveArray of the type same as the scalar, or a DictionaryArray of the value type same as the scalar.

This detects overflow and returns an Err for that. For an non-overflow-checking variant, use add_scalar_dyn instead.

As this kernel has the branching costs and also prevents LLVM from vectorising it correctly, it is usually much slower than non-checking variant.