Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22305#discussion_r231408205
--- Diff: python/pyspark/sql/tests.py ---
@@ -6323,6 +6333,33 @@ def ordered_window(self):
def unpartitioned_window(self):
return Window.partitionBy()
+ @property
+ def sliding_row_window(self):
+ return Window.partitionBy('id').orderBy('v').rowsBetween(-2, 1)
+
+ @property
+ def sliding_range_window(self):
+ from pyspark.sql.functions import lit
+ return
Window.partitionBy('id').orderBy('v').rangeBetween(lit(-2.0), lit(4.0))
+
+ @property
+ def growing_row_window(self):
+ return
Window.partitionBy('id').orderBy('v').rowsBetween(Window.unboundedPreceding, 3)
+
+ @property
+ def growing_range_window(self):
+ return Window.partitionBy('id').orderBy('v') \
+ .rangeBetween(F.unboundedPreceding(), F.lit(4.0))
--- End diff --
Seems like `F.unboundedFollowing()` was removed at #22841.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]