Tpt commented on issue #22676:
URL: https://github.com/apache/datafusion/issues/22676#issuecomment-4592547547

   Outsider comment: materialization is useful not only for CTEs but for 
duplicated subplans in general. Instead of focusing only on CTEs, what about 
not touching the SQL planner at all but add a logical (or physical?) optimizer 
rule that looks for duplicated subplans and according to some heuristics insert 
a new `Materialized`/`Cached` node?
   
   Exploring relations with materialized views might also be great. 
Materializing a subplans doing a query evaluation is very similar to 
creating/using a materialized view.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to