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


##########
arrow-cast/src/cast/decimal.rs:
##########
@@ -167,7 +167,7 @@ where
     let array: PrimitiveArray<T> =
         if input_scale == output_scale && input_precision <= output_precision {
             array.clone()
-        } else if input_scale < output_scale {
+        } else if input_scale <= output_scale {
             // the scale doesn't change, but precision may change and cause 
overflow
             convert_to_bigger_or_equal_scale_decimal::<T, T>(

Review Comment:
   As the call is to `convert_to_bigger_or_equal_scale_decimal`, looks like the 
condition was not correct before. Btw, the above comment is "the scale doesn't 
change...", however, the scale is actually changed, no?



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