You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2023/04/02 19:13:14 UTC

[GitHub] [arrow-rs] comphead commented on a diff in pull request #3996: Handle precision overflow when casting from integer to decimal

comphead commented on code in PR #3996:
URL: https://github.com/apache/arrow-rs/pull/3996#discussion_r1155361268


##########
arrow-cast/src/cast.rs:
##########
@@ -358,13 +358,29 @@ where
 
     let array = if scale < 0 {
         match cast_options.safe {
-            true => array.unary_opt::<_, D>(|v| v.as_().div_checked(scale_factor).ok()),
-            false => array.try_unary::<_, D, _>(|v| v.as_().div_checked(scale_factor))?,
+            true => array.unary_opt::<_, D>(|v| {

Review Comment:
   thanks for taking this



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org