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

    https://github.com/apache/spark/pull/22921#discussion_r231554470
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -319,6 +319,27 @@ setMethod("acos",
                 column(jc)
               })
     
    +#' @details
    +#' \code{approx_count_distinct}: Returns the approximate number of 
distinct items in a group.
    +#'
    +#' @rdname column_aggregate_functions
    +#' @aliases approx_count_distinct approx_count_distinct,Column-method
    +#' @examples
    +#'
    +#' \dontrun{
    +#' head(select(df, approx_count_distinct(df$gear)))
    +#' head(select(df, approx_count_distinct(df$gear, 0.02)))
    +#' head(select(df, countDistinct(df$gear, df$cyl)))
    +#' head(select(df, n_distinct(df$gear)))
    +#' head(distinct(select(df, "gear")))}
    --- End diff --
    
    Thanks, @HyukjinKwon fixed this. Pending tests, does the change look OK to 
you on the R side @felixcheung ?


---

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

Reply via email to