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

    https://github.com/apache/spark/pull/10037#discussion_r46241004
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -488,19 +488,35 @@ setMethod("initcap",
                 column(jc)
               })
     
    -#' isNaN
    +#' isnan
     #'
    -#' Return true iff the column is NaN.
    +#' Return true if the column is NaN.
     #'
    -#' @rdname isNaN
    -#' @name isNaN
    +#' @rdname isnan
    +#' @name isnan
     #' @family normal_funcs
     #' @export
    -#' @examples \dontrun{isNaN(df$c)}
    -setMethod("isNaN",
    +#' @examples \dontrun{isnan(df$c)}
    +setMethod("isnan",
               signature(x = "Column"),
               function(x) {
    -            jc <- callJStatic("org.apache.spark.sql.functions", "isNaN", 
x@jc)
    +            jc <- callJStatic("org.apache.spark.sql.functions", "isnan", 
x@jc)
    +            column(jc)
    +          })
    +
    +#' isnull
    +#'
    +#' Return true if the column is NULL.
    +#'
    +#' @rdname isnull
    +#' @name isnull
    +#' @family normal_funcs
    +#' @export
    +#' @examples \dontrun{isnull(df$c)}
    +setMethod("isnull",
    --- End diff --
    
    this gets tricky... R's usage for NULL is not the same as JVM's. In many 
cases it might be closer to R's NA though not exactly the same either.
    
    eg. can't set a column in data.frame to NULL in the conventional way:
    
http://www.cookbook-r.com/Manipulating_data/Adding_and_removing_columns_from_a_data_frame/
    
    Maybe it's fine to leave it as `isnull` for distinction - we really need 
some explanations on what is a NULL column.


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