beliefer commented on a change in pull request #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#discussion_r362226499
########## File path: sql/core/src/test/resources/sql-tests/results/group-by-filter.sql.out ########## @@ -177,43 +185,56 @@ struct<dept_id:int,sum(salary):double> NULL NULL --- !query 16 +-- !query 17 +SELECT dept_id, SUM(DISTINCT salary) FILTER (WHERE date_format(hiredate, "yyyy-MM-dd HH:mm:ss") > "2001-01-01 00:00:00") FROM emp GROUP BY dept_id +-- !query 17 schema +struct<dept_id:int,sum(DISTINCT salary):double> +-- !query 17 output +10 300.0 Review comment: This result is incorrect. I will check. ---------------------------------------------------------------- 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