alamb commented on issue #4628:
URL: 
https://github.com/apache/arrow-datafusion/issues/4628#issuecomment-1865135558

   >   if we take away sub-tree sharing in LogicalPlan, then the SQL compiler 
would be forced to generate exponential trees right from the start. Whereas in 
the current setup, (properly) generated LP trees would always be linear in the 
size of the input query, and if it blows up in some later optimizer stage, I 
assume it shouldn't be too hard to optimize the optimizer.
   
   
   For what it is worth, @mustafasrepo  and I are working on something similar 
https://github.com/apache/arrow-datafusion/issues/8582 (in the physical plans 
now, any CTEs used more than once will be expanded out and the results not 
shared)


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