arrow_arith::arity

Function try_binary_mut

Source
pub fn try_binary_mut<T, F>(
    a: PrimitiveArray<T>,
    b: &PrimitiveArray<T>,
    op: F,
) -> Result<Result<PrimitiveArray<T>, ArrowError>, PrimitiveArray<T>>
where T: ArrowPrimitiveType, F: Fn(T::Native, T::Native) -> Result<T::Native, ArrowError>,
Expand description

Applies the provided fallible binary operation across a and b by mutating the mutable PrimitiveArray a with the results.

Returns any error encountered, or collects the results into a PrimitiveArray as return value. If any index is null in either a or b, the corresponding index in the result will also be null.

Like try_unary the function is only evaluated for non-null indices.

See binary_mut for errors and buffer reuse information.