From f4dfcdada534ef43ab639b8bacb3fe30c4bb73ad Mon Sep 17 00:00:00 2001 From: Tai Le Manh Date: Tue, 12 Nov 2024 08:43:50 +0700 Subject: [PATCH] fix fmt error --- arrow-cast/src/cast/mod.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arrow-cast/src/cast/mod.rs b/arrow-cast/src/cast/mod.rs index e5f9f9db16d..439facf0292 100644 --- a/arrow-cast/src/cast/mod.rs +++ b/arrow-cast/src/cast/mod.rs @@ -9157,6 +9157,15 @@ mod tests { #[test] fn test_cast_decimal_to_string() { + assert!(can_cast_types( + &DataType::Decimal128(10, 4), + &DataType::Utf8View + )); + assert!(can_cast_types( + &DataType::Decimal256(38, 10), + &DataType::Utf8View + )); + macro_rules! assert_decimal_values { ($array:expr) => { let c = $array; @@ -9208,9 +9217,6 @@ mod tests { .map(|num| num.map(i256::from_i128)) .collect(); - assert!(can_cast_types(&DataType::Decimal128(10, 4), &DataType::Utf8View)); - assert!(can_cast_types(&DataType::Decimal256(38, 10), &DataType::Utf8View)); - test_decimal_to_string::( DataType::Utf8View, create_decimal_array(array128.clone(), 7, 3).unwrap(),