irenjj commented on PR #16016:
URL: https://github.com/apache/datafusion/pull/16016#issuecomment-2907777338

   > Actually this error is thrown after all optimizors are executed, the error 
is thrown because no existing optimizers are capable of handle nested 
subqueries.
   
   It's thrown in planning phase, the error is thrown because in planning 
phase, planner can only get the schema info from upper query block.
   
   > Now whether or not the depth is recorded in the optimizor or in the 
planning phase, we eventually have to convert the plan into DependentJoin, am i 
right?
   
   Yes.
   
   > If in the future we have all the information we need in the planning 
phase, we can remove this "depth detection" logic inside this optimizor and let 
it does what it does best (mainly decorrelation).
   
   In fact, the optimizer doesn't need to be concerned with depth. When 
entering the optimizer, the subquery should already have the relevant column 
information, whether it's retrieved from a certain layer of Binder through 
depth (DuckDB style) or through other methods.
   


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