Dandandan commented on a change in pull request #9776: URL: https://github.com/apache/arrow/pull/9776#discussion_r599302014
########## File path: rust/datafusion/src/sql/planner.rs ########## @@ -114,7 +115,17 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { alias: Option<String>, ) -> Result<LogicalPlan> { let set_expr = &query.body; - let plan = self.set_expr_to_plan(set_expr, alias)?; + let ctes: HashMap<String, Query> = query + .clone() + .with + .map(|with| { + with.cte_tables Review comment: This needs to be converted to a logical plan here already and only allow backward references -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org