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

    https://github.com/apache/spark/pull/20075#discussion_r158751340
  
    --- Diff: R/pkg/R/sparkR.R ---
    @@ -560,10 +560,55 @@ cancelJobGroup <- function(sc, groupId) {
     #'}
     #' @note setJobDescription since 2.3.0
     setJobDescription <- function(value) {
    +  if (!is.null(value)) {
    +    value <- as.character(value)
    +  }
       sc <- getSparkContext()
       invisible(callJMethod(sc, "setJobDescription", value))
     }
     
    +#' Set a local property that affects jobs submitted from this thread, such 
as the
    +#' Spark fair scheduler pool.
    +#'
    +#' @param key The key for a local property.
    +#' @param value The value for a local property.
    +#' @rdname setLocalProperty
    +#' @name setLocalProperty
    +#' @examples
    +#'\dontrun{
    +#' setLocalProperty("spark.scheduler.pool", "poolA")
    +#'}
    +#' @note setLocalProperty since 2.3.0
    +setLocalProperty <- function(key, value) {
    +  if (is.null(key) || is.na(key)) {
    +    stop("key should not be NULL or NA.")
    +  }
    +  if (!is.null(value)) {
    --- End diff --
    
    Just to be clear, `is.na` case seems fine with passing it with 
`as.character`. I added the test.



---

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

Reply via email to