From 056c253cac98a31790cd8dbcb6ef8f788071b7dd Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 20 Dec 2024 09:08:36 -0500 Subject: [PATCH] Minor: improve error message when ARRAY literals can not be planned --- datafusion/sql/src/expr/value.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datafusion/sql/src/expr/value.rs b/datafusion/sql/src/expr/value.rs index a70934b5cd5d..354653e63205 100644 --- a/datafusion/sql/src/expr/value.rs +++ b/datafusion/sql/src/expr/value.rs @@ -24,7 +24,7 @@ use arrow_schema::{DataType, DECIMAL256_MAX_PRECISION}; use bigdecimal::num_bigint::BigInt; use bigdecimal::{BigDecimal, Signed, ToPrimitive}; use datafusion_common::{ - internal_datafusion_err, internal_err, not_impl_err, plan_err, DFSchema, + internal_datafusion_err, not_impl_err, plan_err, DFSchema, DataFusionError, Result, ScalarValue, }; use datafusion_expr::expr::{BinaryExpr, Placeholder}; @@ -169,7 +169,7 @@ impl SqlToRel<'_, S> { } } - internal_err!("Expected a simplified result, but none was found") + not_impl_err!("Could not plan array literal. Hint: is `nested_expressions` DataFusion feature selected?") } /// Convert a SQL interval expression to a DataFusion logical plan