liukun4515 commented on code in PR #2661:
URL: https://github.com/apache/arrow-rs/pull/2661#discussion_r963224097


##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -1657,22 +1657,21 @@ where
     T::Native: num::NumCast,
     R::Native: num::NumCast,
 {
-    let iter = from
-        .iter()
-        .map(|v| match v {
-            None => Ok(None),
-            Some(value) => match num::cast::cast::<T::Native, 
R::Native>(value) {
+    let iter =

Review Comment:
   after https://github.com/apache/arrow-rs/pull/2650 merged, we can use the 
`try_unary` to replace below code



##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -1657,22 +1657,21 @@ where
     T::Native: num::NumCast,
     R::Native: num::NumCast,
 {
-    let iter = from
-        .iter()
-        .map(|v| match v {
-            None => Ok(None),
-            Some(value) => match num::cast::cast::<T::Native, 
R::Native>(value) {
+    let iter =

Review Comment:
   cc @viirya 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to