msirek commented on code in PR #8038:
URL: https://github.com/apache/arrow-datafusion/pull/8038#discussion_r1387163467
##########
datafusion/core/src/physical_optimizer/combine_partial_final_agg.rs:
##########
@@ -86,7 +86,7 @@ impl PhysicalOptimizerRule for CombinePartialFinalAggregate {
} else {
AggregateMode::SinglePartitioned
};
- AggregateExec::try_new(
+ let combined_agg =
AggregateExec::try_new(
Review Comment:
> Another way to express the same logic with less indenting is:
>
> ```rust
> AggregateExec::try_new(
> mode,
>
input_agg_exec.group_by().clone(),
>
input_agg_exec.aggr_expr().to_vec(),
>
input_agg_exec.filter_expr().to_vec(),
>
input_agg_exec.order_by_expr().to_vec(),
> input_agg_exec.input().clone(),
>
input_agg_exec.input_schema().clone(),
> )
> .map(|combined_agg| {
>
combined_agg.with_limit(agg_exec.limit())
> })
> .ok()
> .map(Arc::new)
> ```
Applied this change from your example PR, thanks!
--
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]