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


##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/dsl/package.scala:
##########
@@ -51,6 +51,22 @@ package object dsl {
             .build()
         ).build()
       }
+
+      def groupBy(
+        groupingExprs: proto.Expression*)(aggregateExprs: proto.Expression*): 
proto.Relation = {
+        val agg = proto.Aggregate.newBuilder()
+        agg.setInput(logicalPlan)
+
+        val groupingSet = proto.Aggregate.GroupingSet.newBuilder()
+        for (groupingExpr <- groupingExprs) {
+          groupingSet.addAggregateExpressions(groupingExpr)

Review Comment:
   why do we add group by expression to aggregate expressions?



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