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/10/06 18:14:20 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #3739: Build aggregate schema in Aggregate::try_new

andygrove commented on code in PR #3739:
URL: https://github.com/apache/arrow-datafusion/pull/3739#discussion_r989351054


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -700,20 +698,10 @@ impl LogicalPlanBuilder {
     ) -> Result<Self> {
         let group_expr = normalize_cols(group_expr, &self.plan)?;
         let aggr_expr = normalize_cols(aggr_expr, &self.plan)?;
-
-        let grouping_expr: Vec<Expr> = grouping_set_to_exprlist(group_expr.as_slice())?;
-
-        let all_expr = grouping_expr.iter().chain(aggr_expr.iter());
-        validate_unique_names("Aggregations", all_expr.clone())?;
-        let aggr_schema = DFSchema::new_with_metadata(
-            exprlist_to_fields(all_expr, &self.plan)?,
-            self.plan.schema().metadata().clone(),
-        )?;

Review Comment:
   This code is moved into `Aggregate::try_new`



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