Skip to content

Commit

Permalink
chore: Make binary_mut kernel accept different type for second arg (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya authored Jun 3, 2024
1 parent 13a26d6 commit 198af7a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arrow-arith/src/arity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, F>(
pub fn binary_mut<T, U, F>(
a: PrimitiveArray<T>,
b: &PrimitiveArray<T>,
b: &PrimitiveArray<U>,
op: F,
) -> Result<Result<PrimitiveArray<T>, ArrowError>, PrimitiveArray<T>>
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(
Expand Down

0 comments on commit 198af7a

Please sign in to comment.