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

    https://github.com/apache/spark/pull/11267#discussion_r53583948
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -536,15 +536,27 @@ setMethod("factorial",
     #'
     #' Aggregate function: returns the first value in a group.
     #'
    +#' The function by default returns the first values it sees. It will 
return the first non-NA
    +#' value it sees when ignoreNAs is set to true. If all values are NA, then 
NA is returned.
    +#'
     #' @rdname first
     #' @name first
     #' @family agg_funcs
     #' @export
    -#' @examples \dontrun{first(df$c)}
    +#' @examples
    +#' \dontrun{
    +#' first(df$c)
    +#' first(df$c, TRUE)
    +#' }
     setMethod("first",
    -          signature(x = "Column"),
    -          function(x) {
    -            jc <- callJStatic("org.apache.spark.sql.functions", "first", 
x@jc)
    +          signature(x = "characterOrColumn"),
    +          function(x, ignoreNAs = FALSE) {
    --- End diff --
    
    Make sense, I will update. Thanks!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to