spark git commit: [SPARK-19127][DOCS] Update Rank Function Documentation
Repository: spark Updated Branches: refs/heads/branch-2.1 ecc16220d -> 8690d4bd1 [SPARK-19127][DOCS] Update Rank Function Documentation ## What changes were proposed in this pull request? - [X] Fix inconsistencies in function reference for dense rank and dense - [X] Make all languages equivalent in their reference to `dense_rank` and `rank`. ## How was this patch tested? N/A for docs. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: anabranch Closes #16505 from anabranch/SPARK-19127. (cherry picked from commit 1f6ded6455d07ec8828fc9662ddffe55cbba4238) Signed-off-by: Reynold Xin Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8690d4bd Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8690d4bd Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8690d4bd Branch: refs/heads/branch-2.1 Commit: 8690d4bd150579e546aec7866b16a77bad1017f5 Parents: ecc1622 Author: anabranch Authored: Sun Jan 8 17:53:53 2017 -0800 Committer: Reynold Xin Committed: Sun Jan 8 17:53:59 2017 -0800 -- R/pkg/R/functions.R | 10 ++ python/pyspark/sql/functions.py | 16 ++-- .../main/scala/org/apache/spark/sql/functions.scala | 16 ++-- 3 files changed, 26 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/8690d4bd/R/pkg/R/functions.R -- diff --git a/R/pkg/R/functions.R b/R/pkg/R/functions.R index bf5c963..6ffa0f5 100644 --- a/R/pkg/R/functions.R +++ b/R/pkg/R/functions.R @@ -3150,7 +3150,8 @@ setMethod("cume_dist", #' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking #' sequence when there are ties. That is, if you were ranking a competition using dense_rank #' and had three people tie for second place, you would say that all three were in second -#' place and that the next person came in third. +#' place and that the next person came in third. Rank would give me sequential numbers, making +#' the person that came in third place (after the ties) would register as coming in fifth. #' #' This is equivalent to the \code{DENSE_RANK} function in SQL. #' @@ -3321,10 +3322,11 @@ setMethod("percent_rank", #' #' Window function: returns the rank of rows within a window partition. #' -#' The difference between rank and denseRank is that denseRank leaves no gaps in ranking -#' sequence when there are ties. That is, if you were ranking a competition using denseRank +#' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking +#' sequence when there are ties. That is, if you were ranking a competition using dense_rank #' and had three people tie for second place, you would say that all three were in second -#' place and that the next person came in third. +#' place and that the next person came in third. Rank would give me sequential numbers, making +#' the person that came in third place (after the ties) would register as coming in fifth. #' #' This is equivalent to the RANK function in SQL. #' http://git-wip-us.apache.org/repos/asf/spark/blob/8690d4bd/python/pyspark/sql/functions.py -- diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index d8abafc..7fe901a 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -157,17 +157,21 @@ _window_functions = { 'dense_rank': """returns the rank of rows within a window partition, without any gaps. -The difference between rank and denseRank is that denseRank leaves no gaps in ranking -sequence when there are ties. That is, if you were ranking a competition using denseRank +The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking +sequence when there are ties. That is, if you were ranking a competition using dense_rank and had three people tie for second place, you would say that all three were in second -place and that the next person came in third.""", +place and that the next person came in third. Rank would give me sequential numbers, making +the person that came in third place (after the ties) would register as coming in fifth. + +This is equivalent to the DENSE_RANK function in SQL.""", 'rank': """returns the rank of rows within a window partition. -The difference between rank and denseRank is that denseRank leaves no gaps in ranking -sequence when there are ties. That is, if you were ranking a competition using denseRank +The difference between rank and dense
spark git commit: [SPARK-19127][DOCS] Update Rank Function Documentation
Repository: spark Updated Branches: refs/heads/master 4351e6220 -> 1f6ded645 [SPARK-19127][DOCS] Update Rank Function Documentation ## What changes were proposed in this pull request? - [X] Fix inconsistencies in function reference for dense rank and dense - [X] Make all languages equivalent in their reference to `dense_rank` and `rank`. ## How was this patch tested? N/A for docs. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: anabranch Closes #16505 from anabranch/SPARK-19127. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1f6ded64 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1f6ded64 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1f6ded64 Branch: refs/heads/master Commit: 1f6ded6455d07ec8828fc9662ddffe55cbba4238 Parents: 4351e62 Author: anabranch Authored: Sun Jan 8 17:53:53 2017 -0800 Committer: Reynold Xin Committed: Sun Jan 8 17:53:53 2017 -0800 -- R/pkg/R/functions.R | 10 ++ python/pyspark/sql/functions.py | 16 ++-- .../main/scala/org/apache/spark/sql/functions.scala | 16 ++-- 3 files changed, 26 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/spark/blob/1f6ded64/R/pkg/R/functions.R -- diff --git a/R/pkg/R/functions.R b/R/pkg/R/functions.R index bf5c963..6ffa0f5 100644 --- a/R/pkg/R/functions.R +++ b/R/pkg/R/functions.R @@ -3150,7 +3150,8 @@ setMethod("cume_dist", #' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking #' sequence when there are ties. That is, if you were ranking a competition using dense_rank #' and had three people tie for second place, you would say that all three were in second -#' place and that the next person came in third. +#' place and that the next person came in third. Rank would give me sequential numbers, making +#' the person that came in third place (after the ties) would register as coming in fifth. #' #' This is equivalent to the \code{DENSE_RANK} function in SQL. #' @@ -3321,10 +3322,11 @@ setMethod("percent_rank", #' #' Window function: returns the rank of rows within a window partition. #' -#' The difference between rank and denseRank is that denseRank leaves no gaps in ranking -#' sequence when there are ties. That is, if you were ranking a competition using denseRank +#' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking +#' sequence when there are ties. That is, if you were ranking a competition using dense_rank #' and had three people tie for second place, you would say that all three were in second -#' place and that the next person came in third. +#' place and that the next person came in third. Rank would give me sequential numbers, making +#' the person that came in third place (after the ties) would register as coming in fifth. #' #' This is equivalent to the RANK function in SQL. #' http://git-wip-us.apache.org/repos/asf/spark/blob/1f6ded64/python/pyspark/sql/functions.py -- diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index d8abafc..7fe901a 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -157,17 +157,21 @@ _window_functions = { 'dense_rank': """returns the rank of rows within a window partition, without any gaps. -The difference between rank and denseRank is that denseRank leaves no gaps in ranking -sequence when there are ties. That is, if you were ranking a competition using denseRank +The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking +sequence when there are ties. That is, if you were ranking a competition using dense_rank and had three people tie for second place, you would say that all three were in second -place and that the next person came in third.""", +place and that the next person came in third. Rank would give me sequential numbers, making +the person that came in third place (after the ties) would register as coming in fifth. + +This is equivalent to the DENSE_RANK function in SQL.""", 'rank': """returns the rank of rows within a window partition. -The difference between rank and denseRank is that denseRank leaves no gaps in ranking -sequence when there are ties. That is, if you were ranking a competition using denseRank +The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking +sequence when there are ties. That is, if you