-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Spark-16508][SparkR] Split docs for arrange and orderBy methods #14522
Conversation
Test build #63317 has finished for PR 14522 at commit
|
@@ -551,7 +551,15 @@ setGeneric("merge") | |||
#' @export | |||
setGeneric("mutate", function(.data, ...) {standardGeneric("mutate") }) | |||
|
|||
#' @rdname arrange | |||
#' Ordering Columns in a WindowSpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put this block in windowsspec.R
Could you elaborate how this help with Spark-16508? |
Hi @felixcheung Thanks for reviewing this PR. It happened when I was trying to fix one of the CRAN warnings (Duplicated \argument entries in documentation object |
Test build #63329 has finished for PR 14522 at commit
|
#' @param x a WindowSpec | ||
#' @param col a character or Column object indicating an ordering column | ||
#' @param ... additional sorting fields | ||
#' @return A WindowSpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lower case 'a' to be consistent?
Test build #63368 has finished for PR 14522 at commit
|
@@ -771,6 +771,10 @@ setGeneric("over", function(x, window) { standardGeneric("over") }) | |||
|
|||
###################### WindowSpec Methods ########################## | |||
|
|||
#' @rdname orderBy | |||
#' @export |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, that's interesting. I'm not sure if this is necessary, or if this works. I think the purpose of setGeneric would only need this once. By putting a @Rdname tag it will show up on the Rd file, but I don't think we need to put it twice, once in different Rd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the generated docs, and it showed in both docs, but I do agree that it is not necessary considering the purpose of setGeneric
. Then we have to decide where to put it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps to orderBy? When applied to SparkDataFrame, it simply calls the arrange function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's ok. Doc for the generics isn't super useful anyway.
Test build #63549 has finished for PR 14522 at commit
|
LGTM. Minor point about @name - though it will be good to know since we might tell contributors to always add that |
Since this fixes some CRAN check warnings, let's merge this? @shivaram what do you think? |
Yeah LGTM. Merging this to master, branch-2.0 -- Thanks @junyangq |
This PR splits arrange and orderBy methods according to their functionality (the former for sorting sparkDataFrame and the latter for windowSpec).    Author: Junyang Qian <[email protected]> Closes #14522 from junyangq/SPARK-16508-0. (cherry picked from commit 564fe61) Signed-off-by: Shivaram Venkataraman <[email protected]>
## What changes were proposed in this pull request? This PR splits arrange and orderBy methods according to their functionality (the former for sorting sparkDataFrame and the latter for windowSpec). ## How was this patch tested?    Author: Junyang Qian <[email protected]> Closes apache#14522 from junyangq/SPARK-16508-0.
What changes were proposed in this pull request?
This PR splits arrange and orderBy methods according to their functionality (the former for sorting sparkDataFrame and the latter for windowSpec).
How was this patch tested?