Function arrow::compute::divide_opt

source ·
pub fn divide_opt<T>(
    left: &PrimitiveArray<T>,
    right: &PrimitiveArray<T>
) -> Result<PrimitiveArray<T>, ArrowError>where
    T: ArrowNumericType,
    <T as ArrowPrimitiveType>::Native: ArrowNativeTypeOp,
Expand description

Perform left / right operation on two arrays. If either left or right value is null then the result is also null.

If any right hand value is zero, the operation value will be replaced with null in the result.

Unlike divide or divide_checked, division by zero will yield a null value in the result instead of returning an Err.

For floating point types overflow will saturate at INF or -INF preserving the expected sign value.

For integer types overflow will wrap around.