@@ -1596,8 +1596,6 @@ mod tests {
1596
1596
ensure_returns_error ( & Time64NanosecondArray :: from ( vec ! [ 0 ] ) ) ;
1597
1597
}
1598
1598
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)
1601
1599
#[ test]
1602
1600
fn test_interval_year_month_array ( ) {
1603
1601
let input: IntervalYearMonthArray = vec ! [ 0 , 5 , 24 ] . into ( ) ;
@@ -1618,6 +1616,8 @@ mod tests {
1618
1616
assert ! ( date_part( & input, DatePart :: Week ) . is_err( ) ) ;
1619
1617
}
1620
1618
1619
+ // IntervalDayTimeType week, day, hour, minute, second, milli, u, nano;
1620
+ // invalid month, year; ignores the other part
1621
1621
#[ test]
1622
1622
fn test_interval_day_time_array ( ) {
1623
1623
let input: IntervalDayTimeArray = vec ! [
@@ -1693,6 +1693,8 @@ mod tests {
1693
1693
assert ! ( date_part( & input, DatePart :: Year ) . is_err( ) ) ;
1694
1694
}
1695
1695
1696
+ // IntervalMonthDayNanoType year -> nano;
1697
+ // days don't affect months, time doesn't affect days, time doesn't affect months (and vice versa)
1696
1698
#[ test]
1697
1699
fn test_interval_month_day_nano_array ( ) {
1698
1700
let input: IntervalMonthDayNanoArray = vec ! [
@@ -1728,7 +1730,7 @@ mod tests {
1728
1730
assert_eq ! ( 10 , actual. value( 1 ) ) ;
1729
1731
assert_eq ! ( 35 , actual. value( 2 ) ) ;
1730
1732
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 .
1732
1734
let actual = date_part ( & input, DatePart :: Hour ) . unwrap ( ) ;
1733
1735
let actual = actual. as_primitive :: < Int32Type > ( ) ;
1734
1736
assert_eq ! ( 0 , actual. value( 0 ) ) ;
0 commit comments