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/25 14:29:56 UTC

[GitHub] [arrow-datafusion] yjshen opened a new pull request, #2335: [physical-expr] move aggregate exprs and window exprs to their own modules

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

   # 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.
   -->
   
   N/A.
   
    # 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.  
   -->
   1. Make room for `aggregates` module in the DataFusion core. Move aggregate expression creation logic to `physical-expr`.
   2. Re-organize the physical-expr a little bit, for ease of code browsing. 
   
   # 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.
   -->
   
   Regroup files in physical-expr crate, move `create_agg_expr` from datafusion-core to physcial-expr.
   
   # 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.
   -->
   No.
   


-- 
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] yjshen merged pull request #2335: [physical-expr] move aggregate exprs and window exprs to their own modules

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


-- 
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 #2335: [physical-expr] move aggregate exprs and window exprs to their own modules

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


##########
datafusion/core/src/physical_plan/aggregate_rule.rs:
##########
@@ -1,20 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   nice cleanup



##########
datafusion/physical-expr/src/expressions/mod.rs:
##########
@@ -17,84 +17,65 @@
 
 //! Defines physical expressions that can evaluated at runtime during query execution
 
-mod approx_distinct;
-mod approx_percentile_cont;
-mod approx_percentile_cont_with_weight;
-mod array_agg;
-mod average;
 #[macro_use]
 mod binary;
 mod case;
 mod cast;
 mod column;
-mod count;
-mod cume_dist;
 mod get_indexed_field;
 mod in_list;
 mod is_not_null;
 mod is_null;
-mod lead_lag;
 mod literal;
-#[macro_use]
-mod min_max;
-mod approx_median;
-mod correlation;
-mod covariance;
-mod distinct_expressions;
 mod negative;
 mod not;
-mod nth_value;
 mod nullif;
-mod rank;
-mod row_number;
-mod stats;
-mod stddev;
-mod sum;
 mod try_cast;
-mod variance;
 
 /// Module with some convenient methods used in expression building
 pub mod helpers {
-    pub use super::min_max::{max, min};
+    pub use crate::aggregate::min_max::{max, min};
 }
 
-pub use approx_distinct::ApproxDistinct;
-pub use approx_median::ApproxMedian;
-pub use approx_percentile_cont::ApproxPercentileCont;
-pub use approx_percentile_cont_with_weight::ApproxPercentileContWithWeight;
-pub use array_agg::ArrayAgg;
-pub use average::{Avg, AvgAccumulator};
+pub use crate::aggregate::approx_distinct::ApproxDistinct;

Review Comment:
   👍 



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