Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/20400#discussion_r164052902
--- Diff: python/pyspark/sql/functions.py ---
@@ -809,6 +809,36 @@ def ntile(n):
return Column(sc._jvm.functions.ntile(int(n)))
+@since(2.3)
+def unboundedPreceding():
+ """
+ Window function: returns the special frame boundary that represents
the first row
+ in the window partition.
+ """
+ sc = SparkContext._active_spark_context
+ return Column(sc._jvm.functions.unboundedPreceding())
+
+
+@since(2.3)
+def unboundedFollowing():
+ """
+ Window function: returns the special frame boundary that represents
the last row
+ in the window partition.
+ """
+ sc = SparkContext._active_spark_context
+ return Column(sc._jvm.functions.unboundedFollowing())
+
+
+@since(2.3)
+def currentRow():
+ """
+ Window function: returns the special frame boundary that represents
the current row
+ in the window partition.
+ """
+ sc = SparkContext._active_spark_context
+ return Column(sc._jvm.functions.currentRow())
--- End diff --
Yea, let's add doctests ..
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]