mingmwang commented on PR #4878:
URL: 
https://github.com/apache/arrow-datafusion/pull/4878#issuecomment-1381620794

   Regarding the fix, I think you can call below methods to simply the logic. I 
had test it on my local and it works.
   
   ```rust
                       // Build new group expressions that correspond to the 
output of partial_agg
                       let new_final_group: Vec<Arc<dyn PhysicalExpr>> =
                           partial_agg.output_group_expr();
                       let new_group_by= PhysicalGroupBy::new_single(
                           new_final_group
                               .iter()
                               .enumerate()
                               .map(|(i, expr)| (expr.clone(), 
partial_agg.group_expr().expr()[i].1.clone()))
                               .collect(),
                       );
   ```


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

Reply via email to