From 01407f4824fa4eb656398558183c7cd01537246e Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 2 Aug 2024 09:39:29 -0400 Subject: [PATCH] Minor: improve comments in temporal.rs tests (#6140) --- arrow-arith/src/temporal.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arrow-arith/src/temporal.rs b/arrow-arith/src/temporal.rs index a665b7c06bad..6f8e8cc181c3 100644 --- a/arrow-arith/src/temporal.rs +++ b/arrow-arith/src/temporal.rs @@ -1596,8 +1596,6 @@ mod tests { ensure_returns_error(&Time64NanosecondArray::from(vec![0])); } - // IntervalDayTimeType week, day, hour, miute, second, mili, u, nano; invalid month, year; ignores the other part - // IntervalMonthDayNanoType year -> nano; days don't affect months, time doesn't affect days, time doesn't affect months (and vice versa) #[test] fn test_interval_year_month_array() { let input: IntervalYearMonthArray = vec![0, 5, 24].into(); @@ -1618,6 +1616,8 @@ mod tests { assert!(date_part(&input, DatePart::Week).is_err()); } + // IntervalDayTimeType week, day, hour, minute, second, milli, u, nano; + // invalid month, year; ignores the other part #[test] fn test_interval_day_time_array() { let input: IntervalDayTimeArray = vec![ @@ -1693,6 +1693,8 @@ mod tests { assert!(date_part(&input, DatePart::Year).is_err()); } + // IntervalMonthDayNanoType year -> nano; + // days don't affect months, time doesn't affect days, time doesn't affect months (and vice versa) #[test] fn test_interval_month_day_nano_array() { let input: IntervalMonthDayNanoArray = vec![ @@ -1728,7 +1730,7 @@ mod tests { assert_eq!(10, actual.value(1)); assert_eq!(35, actual.value(2)); - // Times follow from nanos, but are not affected by months or dats. + // Times follow from nanos, but are not affected by months or days. let actual = date_part(&input, DatePart::Hour).unwrap(); let actual = actual.as_primitive::(); assert_eq!(0, actual.value(0));