ethantang93 commented on code in PR #10567:
URL: https://github.com/apache/arrow-rs/pull/10567#discussion_r3730231133
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -2851,6 +2950,17 @@ where
#[cfg(test)]
mod tests {
use super::*;
+
+ #[test]
+ fn test_decimal_f64_power_matches_powi() {
+ for scale in -(Decimal256Type::MAX_SCALE as
i32)..=Decimal256Type::MAX_SCALE as i32 {
+ assert_eq!(
+ decimal_f64_power(scale).to_bits(),
+ 10_f64.powi(scale).to_bits(),
+ "scale {scale}"
Review Comment:
nit: i think for neg values this test is testing the fallback that does the
actual calculation rather than look up
--
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]