waitingkuo commented on code in PR #3000:
URL: https://github.com/apache/arrow-rs/pull/3000#discussion_r1011952240
##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -297,6 +297,9 @@ pub fn can_cast_types(from_type: &DataType, to_type:
&DataType) -> bool {
/// * Time32 and Time64: precision lost when going to higher interval
/// * Timestamp and Date{32|64}: precision lost when going to higher interval
/// * Temporal to/from backing primitive: zero-copy with data type change
+/// * Casting from `float32/float64` to `Decimal(precision, scale)` rounds to
the `scale` decimals
+/// (i.e. casting 6.4999 to Decimal(10, 1) becomes 6.5). This is the
breaking change from `26.0.0`.
+/// It used to truncate it instead of round (i.e. outputs 6.4 instead)
Review Comment:
@Jimexist i updated the doc here
--
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]