izveigor commented on code in PR #4180:
URL: https://github.com/apache/arrow-rs/pull/4180#discussion_r1210783826


##########
arrow-cast/src/cast.rs:
##########
@@ -4821,6 +5011,29 @@ mod tests {
         let array: &Decimal256Array = array.as_primitive();
         assert!(array.is_null(4));
 
+        // test f16 to decimal type
+        let array = Float16Array::from(vec![
+            Some(f16::from_f32(1.1)),
+            Some(f16::from_f32(2.2)),
+            Some(f16::from_f32(4.4)),
+            None,
+            Some(f16::from_f32(1.125_4)), // round down
+            Some(f16::from_f32(1.165_4)), // round up
+        ]);
+        generate_cast_test_case!(
+            &array,
+            Decimal256Array,
+            &decimal_type,
+            vec![
+                Some(i256::from_i128(1099609_i128)), // round down

Review Comment:
   I can't explain why it is not a round number.



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