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(),