You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2025/01/04 19:21:43 UTC

(arrow-rs) branch main updated: remove println (#6935)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 133e13b12f remove println (#6935)
133e13b12f is described below

commit 133e13b12f73259ecaa74eb8378ab2d540adefd6
Author: Himadri Pal <me...@gmail.com>
AuthorDate: Sat Jan 4 11:21:37 2025 -0800

    remove println (#6935)
---
 arrow-cast/src/cast/mod.rs | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/arrow-cast/src/cast/mod.rs b/arrow-cast/src/cast/mod.rs
index 7aff32b0be..440d0a8bec 100644
--- a/arrow-cast/src/cast/mod.rs
+++ b/arrow-cast/src/cast/mod.rs
@@ -3767,7 +3767,6 @@ mod tests {
             Arc::new(StringViewArray::from(vec![Some("1.5"), Some("2.5"), None]));
 
         for array in inputs {
-            println!("type: {}", array.data_type());
             assert!(can_cast_types(array.data_type(), &DataType::Utf8View));
             let arr = cast(&array, &DataType::Utf8View).unwrap();
             assert_eq!(expected.as_ref(), arr.as_ref());
@@ -9971,7 +9970,6 @@ mod tests {
     fn test_decimal_to_decimal_throw_error_on_precision_overflow_same_scale() {
         let array = vec![Some(123456789)];
         let array = create_decimal_array(array, 24, 2).unwrap();
-        println!("{:?}", array);
         let input_type = DataType::Decimal128(24, 2);
         let output_type = DataType::Decimal128(6, 2);
         assert!(can_cast_types(&input_type, &output_type));
@@ -9988,8 +9986,7 @@ mod tests {
     #[test]
     fn test_decimal_to_decimal_throw_error_on_precision_overflow_lower_scale() {
         let array = vec![Some(123456789)];
-        let array = create_decimal_array(array, 24, 2).unwrap();
-        println!("{:?}", array);
+        let array = create_decimal_array(array, 24, 4).unwrap();
         let input_type = DataType::Decimal128(24, 4);
         let output_type = DataType::Decimal128(6, 2);
         assert!(can_cast_types(&input_type, &output_type));
@@ -10000,14 +9997,13 @@ mod tests {
         };
         let result = cast_with_options(&array, &output_type, &options);
         assert_eq!(result.unwrap_err().to_string(),
-                   "Invalid argument error: 123456790 is too large to store in a Decimal128 of precision 6. Max is 999999");
+                   "Invalid argument error: 1234568 is too large to store in a Decimal128 of precision 6. Max is 999999");
     }
 
     #[test]
     fn test_decimal_to_decimal_throw_error_on_precision_overflow_greater_scale() {
         let array = vec![Some(123456789)];
         let array = create_decimal_array(array, 24, 2).unwrap();
-        println!("{:?}", array);
         let input_type = DataType::Decimal128(24, 2);
         let output_type = DataType::Decimal128(6, 3);
         assert!(can_cast_types(&input_type, &output_type));
@@ -10025,7 +10021,6 @@ mod tests {
     fn test_decimal_to_decimal_throw_error_on_precision_overflow_diff_type() {
         let array = vec![Some(123456789)];
         let array = create_decimal_array(array, 24, 2).unwrap();
-        println!("{:?}", array);
         let input_type = DataType::Decimal128(24, 2);
         let output_type = DataType::Decimal256(6, 2);
         assert!(can_cast_types(&input_type, &output_type));