devanbenz commented on code in PR #12466: URL: https://github.com/apache/datafusion/pull/12466#discussion_r1768825680
########## datafusion/sql/src/statement.rs: ########## @@ -1136,14 +1136,29 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { schema: &DFSchemaRef, planner_context: &mut PlannerContext, ) -> Result<Vec<Vec<SortExpr>>> { - // Ask user to provide a schema if schema is empty. + let mut all_results = vec![]; if !order_exprs.is_empty() && schema.fields().is_empty() { - return plan_err!( - "Provide a schema before specifying the order while creating a table." - ); + let mut results = vec![]; + for expr in order_exprs { + for ordered_expr in expr { Review Comment: Sounds good I think that I'll modify this to use a map/collect so I can be hip (and get a single allocation) 😎 -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org