jchen5 commented on code in PR #42026:
URL: https://github.com/apache/spark/pull/42026#discussion_r1265321287
##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameWindowFunctionsSuite.scala:
##########
@@ -1283,7 +1283,13 @@ class DataFrameWindowFunctionsSuite extends QueryTest
("b", 1, "n", Double.PositiveInfinity),
("c", 1, "z", -2.0),
("c", 1, "a", -4.0),
- ("c", 2, nullStr, 5.0)).toDF("key", "value", "order", "value2")
+ ("c", 2, nullStr, 5.0),
+ ("d", 0, "1", 1.0),
+ ("d", 1, "1", 2.0),
+ ("d", 2, "2", 3.0),
+ ("d", 3, "2", -1.0),
+ ("d", 4, "2", 2.0),
+ ("d", 4, "3", 2.0)).toDF("key", "value", "order", "value2")
Review Comment:
The output differed for the dense_rank test cases - for example in the first
dense_rank test case below, there was only one row of d output, instead of two.
This is the test output I get for the new test case without the fix in
DenseRankLimitIterator:
```
!== Correct Answer - 6 == == Spark Answer - 5 ==
!struct<>
struct<key:string,value:int,order:string,value2:double,rn:int>
[a,4,,2.0,1] [a,4,,2.0,1]
[a,4,,2.0,1] [a,4,,2.0,1]
[b,1,h,NaN,1] [b,1,h,NaN,1]
[c,2,null,5.0,1] [c,2,null,5.0,1]
[d,0,1,1.0,1] [d,0,1,1.0,1]
![d,1,1,2.0,1]
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]