alamb commented on code in PR #16696:
URL: https://github.com/apache/datafusion/pull/16696#discussion_r2246415968


##########
datafusion/optimizer/src/optimize_projections/mod.rs:
##########
@@ -826,6 +840,34 @@ pub fn is_projection_unnecessary(
     ))
 }
 
+fn plan_contains_subquery_alias(plan: &LogicalPlan) -> bool {
+    // ambiguity of aliases can arise if there are

Review Comment:
   I agree we don't have to handle the recursive subquery case. However, I am 
worried that the check for two recursive subqueries may not be enough to ensure 
we don't cause some error 🤔 
   
   Can we forbid any subquery reference other than a reference to the 
containing CTE ?



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

Reply via email to