Function arrow::compute::try_binary

source ·
pub fn try_binary<A, B, F, O>(
    a: A,
    b: B,
    op: F
) -> Result<PrimitiveArray<O>, ArrowError>where
    A: ArrayAccessor,
    B: ArrayAccessor,
    O: ArrowPrimitiveType,
    F: Fn(<A as ArrayAccessor>::Item, <B as ArrayAccessor>::Item) -> Result<<O as ArrowPrimitiveType>::Native, ArrowError>,
Expand description

Applies the provided fallible binary operation across a and b, returning any error, and collecting the results into a PrimitiveArray. 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

Error

Return an error if the arrays have different lengths or the operation is under erroneous