Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed May 23, 2024
1 parent c0f913b commit 34edf00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/execution/datafusion/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,11 @@ impl Cast {
DataType::Timestamp(_, _) => {
matches!(to_type, DataType::Int64 | DataType::Date32 | DataType::Utf8)
}
DataType::Binary => {
// note that this is not completely Spark compatible because
// DataFusion only supports binary data containing valid UTF-8 strings
matches!(to_type, DataType::Utf8)
}
_ => false,
}
}
Expand Down

0 comments on commit 34edf00

Please sign in to comment.