cloud-fan commented on a change in pull request #26656: [SPARK-27986][SQL] 
Support ANSI SQL filter clause for aggregate expression

 File path: 
 @@ -135,19 +135,27 @@ object AggUtils {
     val distinctAttributes =
     val groupingAttributes =
+    val filterWithDistinctAttributes = 
     // 1. Create an Aggregate Operator for partial aggregations.
     val partialAggregate: SparkPlan = {
       val aggregateExpressions = = 
       val aggregateAttributes =
       // We will group by the original grouping expression, plus an additional 
expression for the
-      // DISTINCT column. For example, for AVG(DISTINCT value) GROUP BY key, 
the grouping
-      // expressions will be [key, value].
+      // DISTINCT column and the expression in the FILTER clause associated 
with each aggregate
+      // function. For example:
+      // 1.for the AVG (DISTINCT value) GROUP BY key, the grouping expression 
will be [key, value];
+      // 2.for the AVG (value) Filter (WHERE value2> 20) GROUP BY key, the 
grouping expression
+      //   will be [key, value2];
 Review comment:

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.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to