Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/7057#discussion_r34163185
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameWindowSuite.scala
---
@@ -189,7 +189,7 @@ class HiveDataFrameWindowSuite extends QueryTest {
df.select(
$"key",
last("value").over(
- Window.partitionBy($"value").orderBy($"key").rangeBetween(1,
Long.MaxValue))
+ Window.partitionBy($"value").orderBy($"key").rangeBetween(-1, 0))
--- End diff --
Yea. The test is wrong. The test data of this one is a bad one (`val df =
Seq((1, "1"), (2, "2"), (2, "2"), (2, "2"), (1, "1"), (2, "2")).toDF("key",
"value")`). This dataset cannot test `last_value`. Can you change the dataset?
Thank you for pointing out the problem!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]