zhuqi-lucas opened a new pull request, #7534: URL: https://github.com/apache/arrow-rs/pull/7534
…rray with i64::MIN / i64::MAX # Which issue does this PR close? [Closes #7533](https://github.com/apache/arrow-rs/issues/7533) # Rationale for this change Support panic handling and print invalid result. Also added testing ```rust #[test] fn duration_pretty_and_iso_extremes() { // Build [MIN, MAX, 3661, NULL] let arr = DurationSecondArray::from(vec![Some(i64::MIN), Some(i64::MAX), Some(3661), None]); let array: ArrayRef = Arc::new(arr); // Pretty formatting let opts = FormatOptions::default().with_null("<NULL>"); let opts = opts.with_duration_format(DurationFormat::Pretty); let pretty = pretty_format_columns_with_options("pretty", &[array.clone()], &opts) .unwrap() .to_string(); assert_eq!(pretty.matches("<invalid>").count(), 2); assert!(pretty.contains("0 days 1 hours 1 mins 1 secs")); assert!(pretty.contains("<NULL>")); // ISO8601 formatting let opts_iso = FormatOptions::default() .with_null("<NULL>") .with_duration_format(DurationFormat::ISO8601); let iso = pretty_format_columns_with_options("iso", &[array], &opts_iso) .unwrap() .to_string(); assert_eq!(iso.matches("<invalid>").count(), 2); assert!(iso.contains("PT3661S")); assert!(iso.contains("<NULL>")); } ``` # What changes are included in this PR? Support panic handling and print invalid result. # Are there any user-facing changes? Support panic handling and print invalid result. -- 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]
