You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/04 08:00:20 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #31402: [SPARK-34296][SQL] AggregateWindowFunction frame should not always use UnboundedPreceding

AngersZhuuuu commented on a change in pull request #31402:
URL: https://github.com/apache/spark/pull/31402#discussion_r587238370



##########
File path: sql/core/src/test/resources/sql-tests/results/window.sql.out
##########
@@ -1054,3 +1054,219 @@ b	5	NULL	x	y	z	x	z
 a	6	z	x	y	z	x	v
 a	7	v	x	y	z	x	v
 a	8	NULL	x	y	z	x	v
+
+
+-- !query
+SELECT DENSE_RANK() OVER (
+  ORDER BY salary
+ )
+FROM basic_pays
+-- !query schema
+struct<DENSE_RANK() OVER (ORDER BY salary ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):int>
+-- !query output
+1
+10
+11
+12
+13
+14
+15
+16
+17
+2
+3
+4
+5
+6
+7
+8
+9
+
+
+-- !query
+SELECT DENSE_RANK() OVER (
+  ORDER BY salary ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
+ )
+FROM basic_pays
+-- !query schema
+struct<DENSE_RANK() OVER (ORDER BY salary ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):int>
+-- !query output
+1
+10
+11
+12
+13
+14
+15
+16
+17
+2
+3
+4
+5
+6
+7
+8
+9
+
+
+-- !query
+SELECT DENSE_RANK() OVER (
+  ORDER BY salary ROWS BETWEEN 5 PRECEDING AND CURRENT ROW
+ )
+FROM basic_pays
+-- !query schema
+struct<DENSE_RANK() OVER (ORDER BY salary ASC NULLS FIRST ROWS BETWEEN 5 PRECEDING AND CURRENT ROW):int>

Review comment:
       All right, PG's behavior look not reasonable. Close this PR




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



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