xudong963 commented on a change in pull request #1639:
URL: https://github.com/apache/arrow-datafusion/pull/1639#discussion_r790145841



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -213,9 +213,19 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
     ) -> Result<LogicalPlan> {
         let set_expr = &query.body;
         if let Some(with) = &query.with {
+            // a `WITH` block can't use the same name for many times
+            let mut cte_names = HashSet::new();

Review comment:
       Oh, good catch, we can reuse `ctes`!




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