jonahgao commented on code in PR #8283:
URL: https://github.com/apache/arrow-datafusion/pull/8283#discussion_r1399960021
##########
datafusion/sql/src/planner.rs:
##########
@@ -230,6 +229,41 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
Ok(Schema::new(fields))
}
+ pub(super) fn build_column_defaults(
+ &self,
+ columns: &Vec<SQLColumnDef>,
+ planner_context: &mut PlannerContext,
+ ) -> Result<Vec<(String, Expr)>> {
+ let mut column_defaults = vec![];
+ // Default expressions are restricted, column references are not
allowed
+ let empty_schema = DFSchema::empty();
+ let human_readable_error = |e: DataFusionError| match e {
+ DataFusionError::SchemaError(SchemaError::FieldNotFound { .. }) =>
{
+ DataFusionError::Plan(format!(
Review Comment:
I have changed it to `plan_datafusion_err`.
Thank you @comphead .The code looks cleaner now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]