From 57a2135f4bf115754565986813d2c8de5fafb5f6 Mon Sep 17 00:00:00 2001 From: comphead Date: Thu, 7 Mar 2024 19:29:28 -0800 Subject: [PATCH] minor: use arrow-rs casting --- datafusion/physical-expr/src/expressions/cast.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/datafusion/physical-expr/src/expressions/cast.rs b/datafusion/physical-expr/src/expressions/cast.rs index a3bff578cad4..0d94642f14e7 100644 --- a/datafusion/physical-expr/src/expressions/cast.rs +++ b/datafusion/physical-expr/src/expressions/cast.rs @@ -195,10 +195,7 @@ pub fn cast_with_options( let expr_type = expr.data_type(input_schema)?; if expr_type == cast_type { Ok(expr.clone()) - } else if can_cast_types(&expr_type, &cast_type) - || (expr_type == DataType::Float64 - && cast_type == DataType::Timestamp(arrow_schema::TimeUnit::Nanosecond, None)) - { + } else if can_cast_types(&expr_type, &cast_type) { Ok(Arc::new(CastExpr::new(expr, cast_type, cast_options))) } else { not_impl_err!("Unsupported CAST from {expr_type:?} to {cast_type:?}")