pub fn math_op<LT, RT, F>(
left: &PrimitiveArray<LT>,
right: &PrimitiveArray<RT>,
op: F
) -> Result<PrimitiveArray<LT>> where
LT: ArrowNumericType,
RT: ArrowNumericType,
F: Fn(LT::Native, RT::Native) -> LT::Native,
Expand description
Helper function to perform math lambda function on values from two arrays. If either
left or right value is null then the output value is also null, so 1 + null
is
null
.
Errors
This function errors if the arrays have different lengths