@@ -1575,6 +1575,18 @@ impl ScalarValue {
1575
1575
tz
1576
1576
)
1577
1577
}
1578
+ DataType :: Duration ( TimeUnit :: Second ) => {
1579
+ build_array_primitive ! ( DurationSecondArray , DurationSecond )
1580
+ }
1581
+ DataType :: Duration ( TimeUnit :: Millisecond ) => {
1582
+ build_array_primitive ! ( DurationMillisecondArray , DurationMillisecond )
1583
+ }
1584
+ DataType :: Duration ( TimeUnit :: Microsecond ) => {
1585
+ build_array_primitive ! ( DurationMicrosecondArray , DurationMicrosecond )
1586
+ }
1587
+ DataType :: Duration ( TimeUnit :: Nanosecond ) => {
1588
+ build_array_primitive ! ( DurationNanosecondArray , DurationNanosecond )
1589
+ }
1578
1590
DataType :: Interval ( IntervalUnit :: DayTime ) => {
1579
1591
build_array_primitive ! ( IntervalDayTimeArray , IntervalDayTime )
1580
1592
}
@@ -1605,7 +1617,10 @@ impl ScalarValue {
1605
1617
let arrays = arrays. iter ( ) . map ( |a| a. as_ref ( ) ) . collect :: < Vec < _ > > ( ) ;
1606
1618
arrow:: compute:: concat ( arrays. as_slice ( ) ) ?
1607
1619
}
1608
- DataType :: List ( _) | DataType :: LargeList ( _) | DataType :: Struct ( _) => {
1620
+ DataType :: List ( _)
1621
+ | DataType :: LargeList ( _)
1622
+ | DataType :: Struct ( _)
1623
+ | DataType :: Union ( _, _) => {
1609
1624
let arrays = scalars. map ( |s| s. to_array ( ) ) . collect :: < Result < Vec < _ > > > ( ) ?;
1610
1625
let arrays = arrays. iter ( ) . map ( |a| a. as_ref ( ) ) . collect :: < Vec < _ > > ( ) ;
1611
1626
arrow:: compute:: concat ( arrays. as_slice ( ) ) ?
@@ -1673,8 +1688,6 @@ impl ScalarValue {
1673
1688
| DataType :: Time32 ( TimeUnit :: Nanosecond )
1674
1689
| DataType :: Time64 ( TimeUnit :: Second )
1675
1690
| DataType :: Time64 ( TimeUnit :: Millisecond )
1676
- | DataType :: Duration ( _)
1677
- | DataType :: Union ( _, _)
1678
1691
| DataType :: Map ( _, _)
1679
1692
| DataType :: RunEndEncoded ( _, _)
1680
1693
| DataType :: Utf8View
0 commit comments