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/20 17:51:09 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #2294: Move some logical plan types to `datafusion-expr` crate

andygrove opened a new pull request, #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Part of https://github.com/apache/arrow-datafusion/issues/2245
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   We want to move the logical plan to the expr crate so that we can implement subquery expressions.
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   This PR moves some logical plan types into the expr crate and re-exports them in the original logical_plan module for backwards compatibility.
   
   There are no functional changes.
   
   More items will be moved once https://github.com/apache/arrow-datafusion/pull/2290 and https://github.com/apache/arrow-datafusion/pull/2284 are merged.
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   No
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [arrow-datafusion] andygrove merged pull request #2294: Move `LogicalPlan` enum to `datafusion-expr` crate

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294


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


[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2294: Move `LogicalPlan` enum to `datafusion-expr` crate

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294#discussion_r855283435


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

Review Comment:
   @jackwener @xudong963 @mingmwang @paveltiunov fyi :point_up: this is related to conversations you have all been involved in previously so would like to get your feedback on this PR if possible



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


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

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294#issuecomment-1104435447

   AMD64 test failure seems unrelated. Maybe an unreliable test?
   
   ```
   thread 'sql::explain_analyze::explain_analyze_baseline_metrics' panicked at 'plan: GlobalLimitExec: limit=3, metrics=[output_rows=1, elapsed_compute=NOT RECORDED, spill_count=0, spilled_bytes=0, mem_used=0]
   ', datafusion/core/tests/sql/explain_analyze.rs:145:13
   
   
   failures:
       sql::explain_analyze::explain_analyze_baseline_metrics
       ```


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


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

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #2294:
URL: https://github.com/apache/arrow-datafusion/pull/2294#discussion_r854571152


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

Review Comment:
   I wonder if making this a separate crate like `datafusion-logical-plan` might be considered? Is there any reason the logical plan structs need to be in the expr? I could (potentially) see a use of just `Expr`s without also `LogicalPlan`



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