viirya commented on code in PR #4830:
URL: https://github.com/apache/arrow-rs/pull/4830#discussion_r1329070457


##########
arrow-cast/src/cast.rs:
##########
@@ -2801,6 +2801,11 @@ where
     if cast_options.safe {
         let iter = from.iter().map(|v| {
             v.and_then(|v| parse_string_to_decimal_native::<T>(v, scale as 
usize).ok())
+                .and_then(|v| {
+                    T::validate_decimal_precision(v, precision)
+                        .is_ok()
+                        .then_some(v)
+                })

Review Comment:
   I believe that the original idea is to avoid this validation and leave the 
decision to the caller. But after several rounds of revamp on decimal, I'm not 
sure if that is still kept and we want to add validation now.



-- 
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