Github user huaxingao commented on a diff in the pull request:
https://github.com/apache/spark/pull/20400#discussion_r164965040
--- Diff: python/pyspark/sql/functions.py ---
@@ -809,6 +809,45 @@ 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.
+ >>> df = spark.createDataFrame([(5,)])
+ >>> df.select(unboundedPreceding()).show
+ <bound method DataFrame.show of DataFrame[UNBOUNDED PRECEDING: null]>
--- End diff --
@HyukjinKwon Thanks for your comment.
Yes, it is intentional. I am trying to print out something that contains
"UNBOUNDED PRECEDING" when calling the method unboundedPreceding(), so I will
know this method gets executed correctly. I couldn't figure out a better way to
do this. Please let me know if you have a better way.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]