@@ -10,6 +10,7 @@ pub fn is_signed_numeric(dt: &DataType) -> bool {
1010 | DataType :: Float16
1111 | DataType :: Float32
1212 | DataType :: Float64
13+ | DataType :: Null
1314 )
1415}
1516
@@ -33,6 +34,9 @@ pub fn numerical_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<Da
3334 }
3435
3536 match ( lhs_type, rhs_type) {
37+ ( _, DataType :: Null ) => Some ( lhs_type. clone ( ) ) ,
38+ ( DataType :: Null , _) => Some ( rhs_type. clone ( ) ) ,
39+ //
3640 ( _, DataType :: UInt64 ) => Some ( DataType :: UInt64 ) ,
3741 ( DataType :: UInt64 , _) => Some ( DataType :: UInt64 ) ,
3842 //
@@ -50,6 +54,9 @@ pub fn if_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataType>
5054 }
5155
5256 let hack_ty = match ( lhs_type, rhs_type) {
57+ ( _, DataType :: Null ) => Some ( lhs_type. clone ( ) ) ,
58+ ( DataType :: Null , _) => Some ( rhs_type. clone ( ) ) ,
59+ //
5360 ( DataType :: Utf8 , DataType :: UInt64 ) => Some ( DataType :: Utf8 ) ,
5461 ( DataType :: Utf8 , DataType :: Int64 ) => Some ( DataType :: Utf8 ) ,
5562 //
@@ -69,6 +76,9 @@ pub fn least_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTy
6976 }
7077
7178 let hack_ty = match ( lhs_type, rhs_type) {
79+ ( _, DataType :: Null ) => Some ( lhs_type. clone ( ) ) ,
80+ ( DataType :: Null , _) => Some ( rhs_type. clone ( ) ) ,
81+ //
7282 ( DataType :: Utf8 , DataType :: UInt64 ) => Some ( DataType :: Utf8 ) ,
7383 ( DataType :: Utf8 , DataType :: Int64 ) => Some ( DataType :: Utf8 ) ,
7484 //
0 commit comments