Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Only delegate to DataFusion cast when we know that it is compatible with Spark #461

Merged
merged 16 commits into from
May 25, 2024
Merged
4 changes: 3 additions & 1 deletion core/src/execution/datafusion/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,16 @@ impl Cast {
| DataType::Float32
| DataType::Float64
),
DataType::Decimal128(_, _) => matches!(
DataType::Decimal128(_, _) | DataType::Decimal256(_, _) => matches!(
viirya marked this conversation as resolved.
Show resolved Hide resolved
to_type,
DataType::Int8
| DataType::Int16
| DataType::Int32
| DataType::Int64
| DataType::Float32
| DataType::Float64
| DataType::Decimal128(_, _)
| DataType::Decimal256(_, _)
),
DataType::Utf8 => matches!(to_type, DataType::Binary),
DataType::Date32 => matches!(to_type, DataType::Utf8),
Expand Down
Loading