This is an automated email from the ASF dual-hosted git repository.

alamb 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 5fb0534  Fix compilation error with simd feature (#1169)
5fb0534 is described below

commit 5fb0534b5ac8bf1c125a5e3f9b5f1cda75baa0a2
Author: Jörn Horstmann <[email protected]>
AuthorDate: Fri Jan 14 17:17:44 2022 +0100

    Fix compilation error with simd feature (#1169)
---
 arrow/src/compute/kernels/arithmetic.rs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arrow/src/compute/kernels/arithmetic.rs 
b/arrow/src/compute/kernels/arithmetic.rs
index 340c113..4eb9576 100644
--- a/arrow/src/compute/kernels/arithmetic.rs
+++ b/arrow/src/compute/kernels/arithmetic.rs
@@ -628,7 +628,11 @@ where
     #[cfg(feature = "simd")]
     {
         let scalar_vector = T::init(scalar);
-        return simd_unary_math_op(array, |x| x - scalar_vector, |x| x - 
scalar);
+        return Ok(simd_unary_math_op(
+            array,
+            |x| x - scalar_vector,
+            |x| x - scalar,
+        ));
     }
     #[cfg(not(feature = "simd"))]
     return Ok(unary(array, |value| value - scalar));
@@ -706,7 +710,11 @@ where
     #[cfg(feature = "simd")]
     {
         let scalar_vector = T::init(scalar);
-        return simd_unary_math_op(array, |x| x * scalar_vector, |x| x * 
scalar);
+        return Ok(simd_unary_math_op(
+            array,
+            |x| x * scalar_vector,
+            |x| x * scalar,
+        ));
     }
     #[cfg(not(feature = "simd"))]
     return Ok(unary(array, |value| value * scalar));

Reply via email to