alamb commented on code in PR #11369:
URL: https://github.com/apache/arrow-rs/pull/11369#discussion_r4222724179


##########
arrow-cast/src/cast/decimal.rs:
##########
@@ -783,11 +784,8 @@ where
                     if array.is_null(i) {
                         value_builder.append_null();
                     } else {
-                        let v = array
-                            .value(i)
-                            .div_checked(div)
-                            .ok()
-                            .and_then(<T::Native as 
NumCast>::from::<D::Native>);
+                        let v = array.value(i).div_wrapping(div);

Review Comment:
   it would be nice to add a comment explaining that (`// can never overflow 
b/c it is calculated from power of 10` etc



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