Skip to content

Commit 198af7a

Browse files
authored
chore: Make binary_mut kernel accept different type for second arg (#5833)
1 parent 13a26d6 commit 198af7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arrow-arith/src/arity.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,15 @@ where
224224
/// This function gives error if the arrays have different lengths.
225225
/// This function gives error of original [`PrimitiveArray`] `a` if it is not a mutable
226226
/// primitive array.
227-
pub fn binary_mut<T, F>(
227+
pub fn binary_mut<T, U, F>(
228228
a: PrimitiveArray<T>,
229-
b: &PrimitiveArray<T>,
229+
b: &PrimitiveArray<U>,
230230
op: F,
231231
) -> Result<Result<PrimitiveArray<T>, ArrowError>, PrimitiveArray<T>>
232232
where
233233
T: ArrowPrimitiveType,
234-
F: Fn(T::Native, T::Native) -> T::Native,
234+
U: ArrowPrimitiveType,
235+
F: Fn(T::Native, U::Native) -> T::Native,
235236
{
236237
if a.len() != b.len() {
237238
return Ok(Err(ArrowError::ComputeError(

0 commit comments

Comments
 (0)