You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/05 04:25:03 UTC

[GitHub] [arrow-rs] liukun4515 commented on a diff in pull request #3267: Support casting from Decimal256 to float types

liukun4515 commented on code in PR #3267:
URL: https://github.com/apache/arrow-rs/pull/3267#discussion_r1039130698


##########
arrow-cast/src/cast.rs:
##########
@@ -4271,6 +4316,63 @@ mod tests {
             cast_with_options(&array, &DataType::Int8, &CastOptions { safe: true });
         assert!(casted_array.is_ok());
         assert!(casted_array.unwrap().is_null(0));
+
+        // loss the precision: convert decimal to f32、f64
+        // f32
+        // 112345678_f32 and 112345679_f32 are same, so the 112345679_f32 will lose precision.

Review Comment:
   👍



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org