From 198af7a3f4aa20f9bd003209d9f04b0f37bb120e Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Mon, 3 Jun 2024 01:47:47 -0700 Subject: [PATCH] chore: Make binary_mut kernel accept different type for second arg (#5833) --- arrow-arith/src/arity.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arrow-arith/src/arity.rs b/arrow-arith/src/arity.rs index ff5c8e822cc0..99e17c7bdaff 100644 --- a/arrow-arith/src/arity.rs +++ b/arrow-arith/src/arity.rs @@ -224,14 +224,15 @@ where /// This function gives error if the arrays have different lengths. /// This function gives error of original [`PrimitiveArray`] `a` if it is not a mutable /// primitive array. -pub fn binary_mut( +pub fn binary_mut( a: PrimitiveArray, - b: &PrimitiveArray, + b: &PrimitiveArray, op: F, ) -> Result, ArrowError>, PrimitiveArray> where T: ArrowPrimitiveType, - F: Fn(T::Native, T::Native) -> T::Native, + U: ArrowPrimitiveType, + F: Fn(T::Native, U::Native) -> T::Native, { if a.len() != b.len() { return Ok(Err(ArrowError::ComputeError(