waitingkuo commented on code in PR #3000:
URL: https://github.com/apache/arrow-rs/pull/3000#discussion_r1011953551


##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -5994,4 +6003,50 @@ mod tests {
             .collect::<Vec<_>>();
         assert_eq!(&out, &vec!["[0, 1, 2]", "[3, 4, 5]", "[6, 7]"]);
     }
+
+    #[test]
+    #[cfg(not(feature = "force_validate"))]
+    fn test_cast_f64_to_decimal128() {
+        // to reproduce https://github.com/apache/arrow-rs/issues/2997
+
+        let decimal_type = DataType::Decimal128(18, 2);
+        let array = Float64Array::from(vec![
+            Some(0.0699999999),
+            Some(0.0659999999),
+            Some(0.0650000000),
+            Some(0.0649999999),

Review Comment:
   @Jimexist added the 0.065 case which will be rounded up to 0.07



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