Skip to content

Commit 38a9b2d

Browse files
author
Bert Vermeiren
committed
Fix: allow coercion from Binary and LargeBinary into BinaryView
1 parent 95157ef commit 38a9b2d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

datafusion/expr/src/type_coercion/functions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,8 @@ fn coerced_from<'a>(
888888
(Utf8View, Utf8 | LargeUtf8 | Null) => Some(type_into.clone()),
889889
// Any type can be coerced into strings
890890
(Utf8 | LargeUtf8, _) => Some(type_into.clone()),
891+
// We can go into a BinaryView from a Binary or LargeBinary
892+
(BinaryView, Binary | LargeBinary | Null) => Some(type_into.clone()),
891893
(Null, _) if can_cast_types(type_from, type_into) => Some(type_into.clone()),
892894

893895
(List(_), FixedSizeList(_, _)) => Some(type_into.clone()),

0 commit comments

Comments
 (0)