beliefer commented on issue #27058: [SPARK-30395][SQL] When one or more 
DISTINCT aggregate expressions operate on the same field, the DISTINCT 
aggregate expression allows the use of the FILTER clause
URL: https://github.com/apache/spark/pull/27058#issuecomment-572915374
 
 
   > btw, we need a different approach for supporting multiple distinct groups 
(SPARK-30396)? Why did you split the distinct support into two?
   
   This PR will support
   `select a, sum(distinct b) filter (where ...) from t group by a;`
   We only have one DISTINCT aggregate expr, so the columns where the aggregate 
function acting on is same.
   `select a, sum(distinct b) filter (where ...), count(distinct b) filter 
(where ...) from t group by a;`
   We have two DISTINCT aggregate exprs, but the columns where each aggregate 
function acting on is same.
   SPARK-30396 will support
   `select a, sum(distinct b) filter (where ...), count(distinct c) filter 
(where ...) from t group by a;`
   We have two DISTINCT aggregate exprs, the columns where each aggregate 
function acting on is different.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to