You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/21 00:15:36 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2294: Move some logical plan types to `datafusion-expr` crate

andygrove commented on code in PR #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294#discussion_r854666068


##########
datafusion/expr/src/logical_plan/mod.rs:
##########
@@ -0,0 +1,23 @@
+// Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   I was working towards having the logical plan and logical expressions in the same create (currently named `datafusion-expr` but potentially could be renamed to `datafusion-logical-plan`).
   
   The main motivation is that I was planning on adding something like:
   
   ``` rust
   pub enum Expr {
     Exists {
       subquery: Arc<LogicalPlan>,
       negated: bool
     }
     ...
   }
   ```
   
   This would be similar to Apache Spark:
   
   ``` scala
   case class Subquery(child: LogicalPlan, correlated: Boolean) extends OrderPreservingUnaryNode {
   ```
   
   Also similar to Calcite:
   
   ``` java
   public class RexSubQuery extends RexCall {
     public final RelNode rel;
   ```  
   
   I'm not sure how else we would model this but am open to suggestions.



-- 
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: github-unsubscribe@arrow.apache.org

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