beliefer commented on issue #26656: [SPARK-27986][SQL] Support ANSI SQL filter 
clause for aggregate expression
URL: https://github.com/apache/spark/pull/26656#issuecomment-566553957
 
 
   If SQL contains single distinct and a normal agg function with FILTER, it is 
handled by `planAggregateWithOneDistinct`. such as:`sum(distinct a), max(b) 
FILTER (where x > 0)`.
   If SQL contains more than two distinct that use same column and a normal agg 
function with FILTER, it is handled by `planAggregateWithOneDistinct` too. such 
as:`sum(distinct a), avg(distinct a), max(b) FILTER (where x > 0)`.
   If SQL contains more than two distinct that use different column and a 
normal agg function with FILTER, it is handled by `RewriteDistinctAggregates`. 
such as:`sum(distinct a), avg(distinct b), max(b) FILTER (where x > 0)`.
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to