Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/7057#discussion_r33641591
--- 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 --
Yes, it was wrong. The default behavior when Hive parses the this partial
frame definition '..RANGE 1 preceding...' is to expand this into '..RANGE
BETWEEN 1 PRECEDING AND CURRENT ROW...', and not into '..RANGE BETWEEN 1
FOLLOWING AND UNBOUNDED PRECEDING...'. So the test was wrong.
But this still strikes me as odd, how did this pass previous tests? Did the
default behavior change?
---
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]