You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by xu...@apache.org on 2022/10/22 05:39:41 UTC

[arrow-datafusion] branch master updated: Change cast error from Internal to NotImplemented (#3924)

This is an automated email from the ASF dual-hosted git repository.

xudong963 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new cb80b7131 Change cast error from Internal to NotImplemented (#3924)
cb80b7131 is described below

commit cb80b713184fefd84408e8f5a39380050ca61971
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Sat Oct 22 01:39:37 2022 -0400

    Change cast error from Internal to NotImplemented (#3924)
---
 datafusion/physical-expr/src/expressions/cast.rs     | 2 +-
 datafusion/physical-expr/src/expressions/try_cast.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/datafusion/physical-expr/src/expressions/cast.rs b/datafusion/physical-expr/src/expressions/cast.rs
index a1e87a38c..99d2859e7 100644
--- a/datafusion/physical-expr/src/expressions/cast.rs
+++ b/datafusion/physical-expr/src/expressions/cast.rs
@@ -131,7 +131,7 @@ pub fn cast_with_options(
     } else if can_cast_types(&expr_type, &cast_type) {
         Ok(Arc::new(CastExpr::new(expr, cast_type, cast_options)))
     } else {
-        Err(DataFusionError::Internal(format!(
+        Err(DataFusionError::NotImplemented(format!(
             "Unsupported CAST from {:?} to {:?}",
             expr_type, cast_type
         )))
diff --git a/datafusion/physical-expr/src/expressions/try_cast.rs b/datafusion/physical-expr/src/expressions/try_cast.rs
index 92f345de7..6a03a6b53 100644
--- a/datafusion/physical-expr/src/expressions/try_cast.rs
+++ b/datafusion/physical-expr/src/expressions/try_cast.rs
@@ -107,7 +107,7 @@ pub fn try_cast(
     } else if can_cast_types(&expr_type, &cast_type) {
         Ok(Arc::new(TryCastExpr::new(expr, cast_type)))
     } else {
-        Err(DataFusionError::Internal(format!(
+        Err(DataFusionError::NotImplemented(format!(
             "Unsupported CAST from {:?} to {:?}",
             expr_type, cast_type
         )))