Github user actuaryzhang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18025#discussion_r117566353
  
    --- Diff: R/pkg/R/generics.R ---
    @@ -396,67 +397,81 @@ setGeneric("agg", function (x, ...) { 
standardGeneric("agg") })
     #' @param object x a SparkDataFrame or a Column
     #' @param data new name to use
     #' @return a SparkDataFrame or a Column
    +#' @noRd
     NULL
     
     #' @rdname arrange
     #' @export
    +#' @noRd
     setGeneric("arrange", function(x, col, ...) { standardGeneric("arrange") })
     
     #' @rdname as.data.frame
     #' @export
    +#' @noRd
     setGeneric("as.data.frame",
                function(x, row.names = NULL, optional = FALSE, ...) {
                  standardGeneric("as.data.frame")
                })
     
     #' @rdname attach
     #' @export
    +#' @noRd
     setGeneric("attach")
     
     #' @rdname cache
     #' @export
    +#' @noRd
     setGeneric("cache", function(x) { standardGeneric("cache") })
     
     #' @rdname checkpoint
     #' @export
    +#' @noRd
     setGeneric("checkpoint", function(x, eager = TRUE) { 
standardGeneric("checkpoint") })
     
     #' @rdname coalesce
     #' @param x a Column or a SparkDataFrame.
    --- End diff --
    
    Thanks for pointing this out. In this case, it should be `a Column` not `a 
SparkDataFrame or a Column`.  Indeed, this is a problem of documenting only the 
generics and inheriting the parameter doc from the generics in each method. 
Ideally, each specific method of a generic should have its own documentation, 
not the way we document the generics now.  Suppose we have a new method `alias` 
for another class, the doc in the generics needs to be updated to include this 
new class. But it's not clear to the developer where to make the change. If we 
instead just document each method of the generics, it will be much clearer. 
    I will do a thorough cleanup of these issues after we decide on the big 
items. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to