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

jayzhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 8f8df07c80 Minor: change internal error to not supported error for 
nested field access (#11446)
8f8df07c80 is described below

commit 8f8df07c80aa66bb94d57c9619be93f9c3be92a9
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri Jul 12 23:14:17 2024 -0400

    Minor: change internal error to not supported error for nested field access 
(#11446)
---
 datafusion/sql/src/expr/identifier.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/datafusion/sql/src/expr/identifier.rs 
b/datafusion/sql/src/expr/identifier.rs
index d297b2e4df..39736b1fbb 100644
--- a/datafusion/sql/src/expr/identifier.rs
+++ b/datafusion/sql/src/expr/identifier.rs
@@ -18,8 +18,8 @@
 use crate::planner::{ContextProvider, PlannerContext, SqlToRel};
 use arrow_schema::Field;
 use datafusion_common::{
-    internal_err, plan_datafusion_err, Column, DFSchema, DataFusionError, 
Result,
-    ScalarValue, TableReference,
+    internal_err, not_impl_err, plan_datafusion_err, Column, DFSchema, 
DataFusionError,
+    Result, ScalarValue, TableReference,
 };
 use datafusion_expr::{expr::ScalarFunction, lit, Case, Expr};
 use sqlparser::ast::{Expr as SQLExpr, Ident};
@@ -118,7 +118,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             // Though ideally once that support is in place, this code should 
work with it
             // TODO: remove when can support multiple nested identifiers
             if ids.len() > 5 {
-                return internal_err!("Unsupported compound identifier: 
{ids:?}");
+                return not_impl_err!("Compound identifier: {ids:?}");
             }
 
             let search_result = search_dfschema(&ids, schema);
@@ -127,7 +127,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                 Some((field, qualifier, nested_names)) if 
!nested_names.is_empty() => {
                     // TODO: remove when can support multiple nested 
identifiers
                     if nested_names.len() > 1 {
-                        return internal_err!(
+                        return not_impl_err!(
                             "Nested identifiers not yet supported for column 
{}",
                             Column::from((qualifier, field)).quoted_flat_name()
                         );
@@ -154,7 +154,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                     // return default where use all identifiers to not have a 
nested field
                     // this len check is because at 5 identifiers will have to 
have a nested field
                     if ids.len() == 5 {
-                        internal_err!("Unsupported compound identifier: 
{ids:?}")
+                        not_impl_err!("compound identifier: {ids:?}")
                     } else {
                         // check the outer_query_schema and try to find a match
                         if let Some(outer) = 
planner_context.outer_query_schema() {
@@ -165,7 +165,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                                     if !nested_names.is_empty() =>
                                 {
                                     // TODO: remove when can support nested 
identifiers for OuterReferenceColumn
-                                    internal_err!(
+                                    not_impl_err!(
                                         "Nested identifiers are not yet 
supported for OuterReferenceColumn {}",
                                         Column::from((qualifier, 
field)).quoted_flat_name()
                                     )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to