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

    https://github.com/apache/spark/pull/18114#discussion_r123328685
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -2458,111 +2441,78 @@ setMethod("instr", signature(y = "Column", x = 
"character"),
                 column(jc)
               })
     
    -#' next_day
    -#'
    -#' Given a date column, returns the first date which is later than the 
value of the date column
    -#' that is on the specified day of the week.
    -#'
    -#' For example, \code{next_day('2015-07-27', "Sunday")} returns 2015-08-02 
because that is the first
    -#' Sunday after 2015-07-27.
    -#'
    -#' Day of the week parameter is case insensitive, and accepts first three 
or two characters:
    -#' "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun".
    +#' @section Details:
    +#' \code{next_day}: Given a date column, returns the first date which is 
later than the value of
    +#' the date column that is on the specified day of the week. For example,
    +#' \code{next_day('2015-07-27', "Sunday")} returns 2015-08-02 because that 
is the first Sunday
    +#' after 2015-07-27. Day of the week parameter is case insensitive, and 
accepts first three or
    +#' two characters: "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun".
     #'
    -#' @param y Column to compute on.
    -#' @param x Day of the week string.
    -#'
    -#' @family date time functions
    -#' @rdname next_day
    -#' @name next_day
    -#' @aliases next_day,Column,character-method
    +#' @rdname column_datetime_diff_functions
    +#' @aliases next_day next_day,Column,character-method
     #' @export
    -#' @examples
    -#'\dontrun{
    -#'next_day(df$d, 'Sun')
    -#'next_day(df$d, 'Sunday')
    -#'}
     #' @note next_day since 1.5.0
     setMethod("next_day", signature(y = "Column", x = "character"),
               function(y, x) {
                 jc <- callJStatic("org.apache.spark.sql.functions", 
"next_day", y@jc, x)
                 column(jc)
               })
     
    -#' to_utc_timestamp
    -#'
    -#' Given a timestamp, which corresponds to a certain time of day in the 
given timezone, returns
    -#' another timestamp that corresponds to the same time of day in UTC.
    +#' @section Details:
    +#' \code{to_utc_timestamp}: Given a timestamp, which corresponds to a 
certain time of day
    +#' in the given timezone, returns another timestamp that corresponds to 
the same time of day in UTC.
     #'
    -#' @param y Column to compute on
    -#' @param x timezone to use
    -#'
    -#' @family date time functions
    -#' @rdname to_utc_timestamp
    -#' @name to_utc_timestamp
    -#' @aliases to_utc_timestamp,Column,character-method
    +#' @rdname column_datetime_diff_functions
    +#' @aliases to_utc_timestamp to_utc_timestamp,Column,character-method
     #' @export
    -#' @examples \dontrun{to_utc_timestamp(df$t, 'PST')}
     #' @note to_utc_timestamp since 1.5.0
     setMethod("to_utc_timestamp", signature(y = "Column", x = "character"),
               function(y, x) {
                 jc <- callJStatic("org.apache.spark.sql.functions", 
"to_utc_timestamp", y@jc, x)
                 column(jc)
               })
     
    -#' add_months
    +#' @section Details:
    +#' \code{add_months}: Returns the date that is numMonths after startDate.
    --- End diff --
    
    Yes, this was the original description. Updated to make it clearer. Also, 
the examples now will help users figure out how to use these methods.   


---
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