Surajsuthar commented on code in PR #12462:
URL: https://github.com/apache/arrow-rs/pull/12462#discussion_r4716291529
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -73,10 +74,36 @@ pub use decimal::{DecimalCast, float_to_decimal,
float_to_decimal_opt, rescale_d
pub use decimal::{parse_string_to_decimal_native, single_float_to_decimal};
pub use string::cast_single_string_to_boolean_default;
-/// Integers below 2^53 convert to an `f64` exactly.
-const F64_EXACT_INT_LIMIT: f64 = 9_007_199_254_740_992.0;
-/// Integers below 2^24 convert to an `f32` exactly.
-const F32_EXACT_INT_LIMIT: f64 = 16_777_216.0;
+/// Integers at or below 2^53 convert to an `f64` exactly.
+const F64_EXACT_INT_LIMIT: i64 = 1 << 53;
+/// Integers at or below 2^24 convert to an `f32` exactly.
+const F32_EXACT_INT_LIMIT: i64 = 1 << 24;
Review Comment:
only to compared with the original decimal integer value before converting
it to f64
--
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]