This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 198af7a3f4a chore: Make binary_mut kernel accept different type for
second arg (#5833)
198af7a3f4a is described below
commit 198af7a3f4aa20f9bd003209d9f04b0f37bb120e
Author: Liang-Chi Hsieh <[email protected]>
AuthorDate: Mon Jun 3 01:47:47 2024 -0700
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 ff5c8e822cc..99e17c7bdaf 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<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(