Skip to content

Commit bccdc2e

Browse files
committed
coerce type from null to date32
1 parent df2d0ce commit bccdc2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

datafusion/expr/src/type_coercion/functions.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ fn coerced_from<'a>(
572572
{
573573
Some(type_into.clone())
574574
}
575+
(Date32, _) if matches!(type_from, Date32 | Utf8 | LargeUtf8 | Null) => {
576+
Some(type_into.clone())
577+
}
575578
(Timestamp(TimeUnit::Nanosecond, None), _)
576579
if matches!(
577580
type_from,
@@ -580,7 +583,7 @@ fn coerced_from<'a>(
580583
{
581584
Some(type_into.clone())
582585
}
583-
(Interval(_), _) if matches!(type_from, Utf8 | LargeUtf8) => {
586+
(Interval(_), _) if matches!(type_from, Utf8 | LargeUtf8 | Null) => {
584587
Some(type_into.clone())
585588
}
586589
// We can go into a Utf8View from a Utf8 or LargeUtf8

0 commit comments

Comments
 (0)