@@ -30,12 +30,14 @@ use arrow::datatypes::{
3030} ;
3131use arrow:: {
3232 array:: {
33- ArrayRef , BinaryArray , BooleanArray , Date32Array , Date64Array , Float32Array ,
34- Float64Array , Int16Array , Int32Array , Int64Array , Int8Array , LargeBinaryArray ,
35- LargeStringArray , StringArray , Time32MillisecondArray , Time32SecondArray ,
36- Time64MicrosecondArray , Time64NanosecondArray , TimestampMicrosecondArray ,
37- TimestampMillisecondArray , TimestampNanosecondArray , TimestampSecondArray ,
38- UInt16Array , UInt32Array , UInt64Array , UInt8Array ,
33+ ArrayRef , BinaryArray , BooleanArray , Date32Array , Date64Array ,
34+ DurationMicrosecondArray , DurationMillisecondArray , DurationNanosecondArray ,
35+ DurationSecondArray , Float32Array , Float64Array , Int16Array , Int32Array ,
36+ Int64Array , Int8Array , LargeBinaryArray , LargeStringArray , StringArray ,
37+ Time32MillisecondArray , Time32SecondArray , Time64MicrosecondArray ,
38+ Time64NanosecondArray , TimestampMicrosecondArray , TimestampMillisecondArray ,
39+ TimestampNanosecondArray , TimestampSecondArray , UInt16Array , UInt32Array ,
40+ UInt64Array , UInt8Array ,
3941 } ,
4042 datatypes:: Field ,
4143} ;
@@ -408,6 +410,34 @@ macro_rules! min_max_batch {
408410 $OP
409411 )
410412 }
413+ DataType :: Duration ( TimeUnit :: Second ) => {
414+ typed_min_max_batch!( $VALUES, DurationSecondArray , DurationSecond , $OP)
415+ }
416+ DataType :: Duration ( TimeUnit :: Millisecond ) => {
417+ typed_min_max_batch!(
418+ $VALUES,
419+ DurationMillisecondArray ,
420+ DurationMillisecond ,
421+ $OP
422+ )
423+ }
424+ DataType :: Duration ( TimeUnit :: Microsecond ) => {
425+ typed_min_max_batch!(
426+ $VALUES,
427+ DurationMicrosecondArray ,
428+ DurationMicrosecond ,
429+ $OP
430+ )
431+ }
432+ DataType :: Duration ( TimeUnit :: Nanosecond ) => {
433+ typed_min_max_batch!(
434+ $VALUES,
435+ DurationNanosecondArray ,
436+ DurationNanosecond ,
437+ $OP
438+ )
439+ }
440+
411441 other => {
412442 // This should have been handled before
413443 return internal_err!(
0 commit comments