Skip to content

Commit 8c48a8c

Browse files
alambcomphead
andauthored
Minor: improve error message when ARRAY literals can not be planned (#13859)
* Minor: improve error message when ARRAY literals can not be planned * fmt * Update datafusion/sql/src/expr/value.rs Co-authored-by: Oleks V <[email protected]> --------- Co-authored-by: Oleks V <[email protected]>
1 parent a50ed34 commit 8c48a8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

datafusion/sql/src/expr/value.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use arrow_schema::{DataType, DECIMAL256_MAX_PRECISION};
2424
use bigdecimal::num_bigint::BigInt;
2525
use bigdecimal::{BigDecimal, Signed, ToPrimitive};
2626
use datafusion_common::{
27-
internal_datafusion_err, internal_err, not_impl_err, plan_err, DFSchema,
28-
DataFusionError, Result, ScalarValue,
27+
internal_datafusion_err, not_impl_err, plan_err, DFSchema, DataFusionError, Result,
28+
ScalarValue,
2929
};
3030
use datafusion_expr::expr::{BinaryExpr, Placeholder};
3131
use datafusion_expr::planner::PlannerResult;
@@ -169,7 +169,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
169169
}
170170
}
171171

172-
internal_err!("Expected a simplified result, but none was found")
172+
not_impl_err!("Could not plan array literal. Hint: Please try with `nested_expressions` DataFusion feature enabled")
173173
}
174174

175175
/// Convert a SQL interval expression to a DataFusion logical plan

0 commit comments

Comments
 (0)