comphead commented on code in PR #8283:
URL: https://github.com/apache/arrow-datafusion/pull/8283#discussion_r1399623703


##########
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:
   please use `plan_err!` macro



-- 
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]

Reply via email to