You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mingmwang (via GitHub)" <gi...@apache.org> on 2023/04/06 02:25:24 UTC

[GitHub] [arrow-datafusion] mingmwang commented on a diff in pull request #5837: Add new physical rule CombinePartialFinalAggregate

mingmwang commented on code in PR #5837:
URL: https://github.com/apache/arrow-datafusion/pull/5837#discussion_r1159221512


##########
datafusion/core/src/physical_plan/aggregates/mod.rs:
##########
@@ -360,7 +380,9 @@ impl ExecutionPlan for AggregateExec {
 
     fn required_input_distribution(&self) -> Vec<Distribution> {
         match &self.mode {
-            AggregateMode::Partial => vec![Distribution::UnspecifiedDistribution],
+            AggregateMode::Partial | AggregateMode::Single => {

Review Comment:
   It should be the same as the `AggregateMode::Partial`.  And this new rule will be applied after the `EnforceDistribution` rule,  which means the distribution requirements are already satisfied, and then the adjacent `Partial` and `Final` Aggregate are combined to a new `Single` Aggregate.



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