Skip to content

Commit

Permalink
Minor: improve error message when ARRAY literals can not be planned (a…
Browse files Browse the repository at this point in the history
…pache#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]>
  • Loading branch information
2 people authored and zhuqi-lucas committed Dec 23, 2024
1 parent 20eae20 commit 7070846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/sql/src/expr/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ 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,
DataFusionError, Result, ScalarValue,
internal_datafusion_err, not_impl_err, plan_err, DFSchema, DataFusionError, Result,
ScalarValue,
};
use datafusion_expr::expr::{BinaryExpr, Placeholder};
use datafusion_expr::planner::PlannerResult;
Expand Down Expand Up @@ -169,7 +169,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
}
}

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

/// Convert a SQL interval expression to a DataFusion logical plan
Expand Down

0 comments on commit 7070846

Please sign in to comment.