Skip to content

Commit 01407f4

Browse files
authored
Minor: improve comments in temporal.rs tests (#6140)
1 parent 0c3732f commit 01407f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arrow-arith/src/temporal.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1596,8 +1596,6 @@ mod tests {
15961596
ensure_returns_error(&Time64NanosecondArray::from(vec![0]));
15971597
}
15981598

1599-
// IntervalDayTimeType week, day, hour, miute, second, mili, u, nano; invalid month, year; ignores the other part
1600-
// IntervalMonthDayNanoType year -> nano; days don't affect months, time doesn't affect days, time doesn't affect months (and vice versa)
16011599
#[test]
16021600
fn test_interval_year_month_array() {
16031601
let input: IntervalYearMonthArray = vec![0, 5, 24].into();
@@ -1618,6 +1616,8 @@ mod tests {
16181616
assert!(date_part(&input, DatePart::Week).is_err());
16191617
}
16201618

1619+
// IntervalDayTimeType week, day, hour, minute, second, milli, u, nano;
1620+
// invalid month, year; ignores the other part
16211621
#[test]
16221622
fn test_interval_day_time_array() {
16231623
let input: IntervalDayTimeArray = vec![
@@ -1693,6 +1693,8 @@ mod tests {
16931693
assert!(date_part(&input, DatePart::Year).is_err());
16941694
}
16951695

1696+
// IntervalMonthDayNanoType year -> nano;
1697+
// days don't affect months, time doesn't affect days, time doesn't affect months (and vice versa)
16961698
#[test]
16971699
fn test_interval_month_day_nano_array() {
16981700
let input: IntervalMonthDayNanoArray = vec![
@@ -1728,7 +1730,7 @@ mod tests {
17281730
assert_eq!(10, actual.value(1));
17291731
assert_eq!(35, actual.value(2));
17301732

1731-
// Times follow from nanos, but are not affected by months or dats.
1733+
// Times follow from nanos, but are not affected by months or days.
17321734
let actual = date_part(&input, DatePart::Hour).unwrap();
17331735
let actual = actual.as_primitive::<Int32Type>();
17341736
assert_eq!(0, actual.value(0));

0 commit comments

Comments
 (0)