jonahgao commented on code in PR #7581:
URL: https://github.com/apache/arrow-datafusion/pull/7581#discussion_r1446062679


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -112,6 +112,8 @@ pub enum LogicalPlan {
     /// produces 0 or 1 row. This is used to implement SQL `SELECT`
     /// that has no values in the `FROM` clause.
     EmptyRelation(EmptyRelation),
+    /// A named temporary relation with a schema.
+    NamedRelation(NamedRelation),

Review Comment:
   I am considering whether the `NamedRelation` and `RecursiveQuery` could be 
implemented as two `TableSource`s, one being `CTESelfRefTable` and the other 
being `CTERecursiveTable`, and then use 
[TableScan](https://github.com/apache/arrow-datafusion/blob/f5ca078f964b2a19db41e85640b1461508d4b8a6/datafusion/expr/src/logical_plan/plan.rs#L110)
 to read them. 
   
   Use `CTESelfRefTable` within the recursive term and `CTERecursiveTable` in 
the outer query. 
   
   But this idea is in its early stages and may be wrong.



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