@@ -594,12 +594,41 @@ pub fn interval_coercion(
594
594
| ( Interval ( _) , Timestamp ( unit, zone) ) => {
595
595
Some ( Timestamp ( unit. clone ( ) , zone. clone ( ) ) )
596
596
}
597
+ ( Date32 , Interval ( _) ) | ( Interval ( _) , Date32 ) => {
598
+ // TODO: this is not correct and should be replaced with correctly typed timestamp
599
+ Some ( Date32 )
600
+ }
601
+ ( Date64 , Interval ( _) ) | ( Interval ( _) , Date64 ) => {
602
+ // TODO: this is not correct and should be replaced with correctly typed timestamp
603
+ Some ( Date64 )
604
+ }
597
605
_ => None ,
598
606
} ,
599
607
Operator :: Multiply => match ( lhs_type, rhs_type) {
600
608
( Int64 , Interval ( itype) ) | ( Interval ( itype) , Int64 ) => {
601
609
Some ( Interval ( itype. clone ( ) ) )
602
610
}
611
+ ( Int32 , Interval ( itype) ) | ( Interval ( itype) , Int32 ) => {
612
+ Some ( Interval ( itype. clone ( ) ) )
613
+ }
614
+ ( Int16 , Interval ( itype) ) | ( Interval ( itype) , Int16 ) => {
615
+ Some ( Interval ( itype. clone ( ) ) )
616
+ }
617
+ ( Int8 , Interval ( itype) ) | ( Interval ( itype) , Int8 ) => {
618
+ Some ( Interval ( itype. clone ( ) ) )
619
+ }
620
+ ( UInt64 , Interval ( itype) ) | ( Interval ( itype) , UInt64 ) => {
621
+ Some ( Interval ( itype. clone ( ) ) )
622
+ }
623
+ ( UInt32 , Interval ( itype) ) | ( Interval ( itype) , UInt32 ) => {
624
+ Some ( Interval ( itype. clone ( ) ) )
625
+ }
626
+ ( UInt16 , Interval ( itype) ) | ( Interval ( itype) , UInt16 ) => {
627
+ Some ( Interval ( itype. clone ( ) ) )
628
+ }
629
+ ( UInt8 , Interval ( itype) ) | ( Interval ( itype) , UInt8 ) => {
630
+ Some ( Interval ( itype. clone ( ) ) )
631
+ }
603
632
_ => None ,
604
633
} ,
605
634
_ => None ,
0 commit comments