spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] maropu commented on a change in pull request #27058: [SPARK-30276][SQL] Support Filter expression allows simultaneous use of DISTINCT
Date Fri, 17 Jan 2020 01:08:14 GMT
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_r367726900
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/postgreSQL/aggregates_part3.sql.out
 ##########
 @@ -28,11 +28,25 @@ struct<sum((CAST(1 AS DOUBLE) / CAST(ten AS DOUBLE))) FILTER (WHERE
(ten > 0)):d
 
 
 -- !query 3
+select ten, sum(distinct four) filter (where four > 10) from onek a
+group by ten
+having exists (select 1 from onek b where sum(distinct a.four) = b.four)
+-- !query 3 schema
+struct<ten:int,sum(DISTINCT four) FILTER (WHERE (four > 10)):bigint>
+-- !query 3 output
+0	NULL
+2	NULL
+4	NULL
+6	NULL
+8	NULL
+
 
 Review comment:
   Checked this is the same with PostgreSQL one: https://github.com/postgres/postgres/blob/0ab7110bcbcce5ff58afb32e7871c54e87502139/src/test/regress/expected/aggregates.out#L1543

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


With regards,
Apache Git Services

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


Mime
View raw message