maropu commented on a change in pull request #27058: [SPARK-30276][SQL] Support 
Filter expression allows simultaneous use of DISTINCT
URL: https://github.com/apache/spark/pull/27058#discussion_r367733835
 
 

 ##########
 File path: 
sql/core/src/test/resources/sql-tests/results/group-by-filter.sql.out
 ##########
 @@ -95,41 +95,73 @@ struct<count(id) FILTER (WHERE (date_format(CAST(hiredate 
AS TIMESTAMP), yyyy-MM
 
 
 -- !query 9
-SELECT a, COUNT(b) FILTER (WHERE a >= 2) FROM testData GROUP BY a
+SELECT COUNT(DISTINCT id) FILTER (WHERE date_format(hiredate, "yyyy-MM-dd 
HH:mm:ss") = "2001-01-01 00:00:00") FROM emp
 -- !query 9 schema
-struct<a:int,count(b) FILTER (WHERE (a >= 2)):bigint>
+struct<count(DISTINCT id) FILTER (WHERE (date_format(CAST(hiredate AS 
TIMESTAMP), yyyy-MM-dd HH:mm:ss) = 2001-01-01 00:00:00)):bigint>
 -- !query 9 output
+2
 
 Review comment:
   Checked, too: https://gist.github.com/maropu/20ded5e79481d22d2267bd3da9d32972

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