aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/sql/functions.py
diff options
context:
space:
mode:
authorDavies Liu <davies@databricks.com>2015-08-14 13:55:29 -0700
committerReynold Xin <rxin@databricks.com>2015-08-14 13:55:29 -0700
commit11ed2b180ec86523a94679a8b8132fadb911ccd5 (patch)
tree308f29be0ed48ffbff823fdacd0f37410af1a869 /python/pyspark/sql/functions.py
parent9407baa2a7c26f527f2d043715d313d75bd765bb (diff)
downloadspark-11ed2b180ec86523a94679a8b8132fadb911ccd5.tar.gz
spark-11ed2b180ec86523a94679a8b8132fadb911ccd5.tar.bz2
spark-11ed2b180ec86523a94679a8b8132fadb911ccd5.zip
[SPARK-9978] [PYSPARK] [SQL] fix Window.orderBy and doc of ntile()
Author: Davies Liu <davies@databricks.com> Closes #8213 from davies/fix_window.
Diffstat (limited to 'python/pyspark/sql/functions.py')
-rw-r--r--python/pyspark/sql/functions.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py
index e98979533f..41dfee9f54 100644
--- a/python/pyspark/sql/functions.py
+++ b/python/pyspark/sql/functions.py
@@ -530,9 +530,10 @@ def lead(col, count=1, default=None):
@since(1.4)
def ntile(n):
"""
- Window function: returns a group id from 1 to `n` (inclusive) in a round-robin fashion in
- a window partition. Fow example, if `n` is 3, the first row will get 1, the second row will
- get 2, the third row will get 3, and the fourth row will get 1...
+ Window function: returns the ntile group id (from 1 to `n` inclusive)
+ in an ordered window partition. Fow example, if `n` is 4, the first
+ quarter of the rows will get value 1, the second quarter will get 2,
+ the third quarter will get 3, and the last quarter will get 4.
This is equivalent to the NTILE function in SQL.