cloud-fan commented on code in PR #38627:
URL: https://github.com/apache/spark/pull/38627#discussion_r1021067557


##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -441,11 +441,14 @@ class SparkConnectPlanner(session: SparkSession) {
           case x => UnresolvedAlias(x)
         }
 
+    // Retain group columns in aggregate expressions:
+    val aggExprs =
+      groupingExprs ++ 
rel.getResultExpressionsList.asScala.map(transformResultExpression)

Review Comment:
   To match DataFrame API, I think we should allow clients to choose the 
behavior. How about we add a bool flag in the proto message of `Aggregate`? 
Clients can either use config or expose APIs directly to set this bool flag.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to