morrySnow opened a new issue, #13616:
URL: https://github.com/apache/doris/issues/13616

   This issue is used to record the progress of the implementation of CTE 
functions and subtasks in nereids. Currently, the CTE syntax is implemented by 
fully inlining it(in #12742), without cost-based optimization. Based on 
approaches and algorithms in paper [Optimization of Common Table Expressions in 
MPP Database Systems](http://www.vldb.org/pvldb/vol8/p1704-elhelw.pdf), there 
are still a few more subtasks to be done, which may refactor the current CTE 
implementation.
   
   Subtasks for this issue:
   
   - [x] the completed CTE-related syntax, except keyword RECURSIVE, which is 
not supported in existing implementation; 
https://github.com/apache/doris/pull/12742
   - [ ] data structures (and corresponding logical and physical operators, if 
necessary) for CTE, includes CTEProducer, CTEConsumer, CTEAnchor, Sequence;
   - [ ] transformation rules for CTE, includes anchorToNoOp, anchorToSequence, 
consumerToInlinedCTEPlan;
   - [ ] algorithm to check and eliminate invalid CTE derived plan(generated by 
CTE transformation rules);
   - [ ] optimization for CTEConsumer, includes predicate push down(specific to 
CTE), inline single-used CTEs, eliminate unused CTEs recursively;
   - [ ] choose the best CTE plan alternatives by CBO;
   - [ ] materialize results of CTEProducer, and deliver those results to 
corresponding CTEConsumer in correct order(to avoid deadlocks);
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to