This is an automated email from the ASF dual-hosted git repository.
comphead pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new a68f1cbb0c minor: use arrow-rs casting (#9500)
a68f1cbb0c is described below
commit a68f1cbb0c31f263bfa4c7920482e689ffe1ee89
Author: comphead <[email protected]>
AuthorDate: Fri Mar 8 08:13:38 2024 -0800
minor: use arrow-rs casting (#9500)
---
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 a3bff578ca..0d94642f14 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:?}")