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/05/06 16:47:34 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2457: Fix bugs in SQL planner with GROUP BY scalar function
alamb commented on code in PR #2457:
URL: https://github.com/apache/arrow-datafusion/pull/2457#discussion_r866994668
##########
datafusion/core/src/sql/planner.rs:
##########
@@ -1144,30 +1144,45 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
group_by_exprs: Vec<Expr>,
aggr_exprs: Vec<Expr>,
) -> Result<(LogicalPlan, Vec<Expr>, Option<Expr>)> {
+ // create the aggregate plan
+ let plan = LogicalPlanBuilder::from(input.clone())
+ .aggregate(group_by_exprs.clone(), aggr_exprs.clone())?
+ .build()?;
+
+ // in this next section of code we are re-writing the projection to refer to columns
Review Comment:
I am a huge fan of the comments ❤️ thank you
--
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