Re: [Help Needed] Dissecting CTE out of Calcite LogicPlan

2023-07-26 Thread Gavin Ray
On a semi-tangent I would be curious to see the images, if Ken could maybe upload to a public image host like imgur (or similar) and then share the links here. On Wed, Jul 26, 2023 at 2:20 PM Julian Hyde wrote: > Your images did not come through (ASF mail server strips them from all > emails)

Re: [Help Needed] Dissecting CTE out of Calcite LogicPlan

2023-07-26 Thread Julian Hyde
Your images did not come through (ASF mail server strips them from all emails) but I’ll try my best to answer. As you note, we added the Spool operator to model the case where the RelNode tree is a DAG (one node has more than one consumer). But other than that, relational algebra doesn’t have

[Help Needed] Dissecting CTE out of Calcite LogicPlan

2023-07-26 Thread Ken Yang
Dear Calcite Community, We are trying to use Calcite to parse SQLs, by breaking complicated SQLs into WITH-AS blocks. Particularly, our goal is to first parse an SQL clause into Calcite Logical Plans, and then manually traverse the entire tree and use WITH-AS to wrap any sub-trees with a