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

    https://github.com/apache/spark/pull/14775#discussion_r76522977
  
    --- Diff: R/pkg/R/backend.R ---
    @@ -37,12 +51,42 @@ callJMethod <- function(objId, methodName, ...) {
       invokeJava(isStatic = FALSE, objId$id, methodName, ...)
     }
     
    -# Call a static method on a specified className
    +#' Call Static Java Methods
    +#'
    +#' Call a static method in the JVM running the Spark driver.
    +#'
    +#' @param className class containing the static method to invoke.
    +#' @param methodName name of static method to invoke.
    +#' @param ... parameters to pass to the Java method.
    +#' @export
    +#' @seealso callJMethod, newJObject
    +#' @examples
    +#' \dontrun{
    +#' sparkR.session() # Need to have a Spark JVM running before calling 
callJStatic
    +#' callJStatic("java.lang.System", "currentTimeMillis")
    +#' callJStatic("java.lang.System", "getProperty", "java.home")
    +#' }
     callJStatic <- function(className, methodName, ...) {
       invokeJava(isStatic = TRUE, className, methodName, ...)
     }
     
    -# Create a new object of the specified class name
    +#' Create Java Objects
    +#'
    +#' Create a new Java object in the JVM running the Spark driver.
    +#'
    +#' @param className name of the class to create
    --- End diff --
    
    I tried to qualify this in the comment on what gets returned. The trouble 
is that we dont have an externally visible documentation of what types will get 
converted vs. what will not. Also I think this is bound to change with versions 
(like the SQL decimal change for example). 
    
    However this is a very low level API that is only for advanced developers. 
So I wonder if we should just leave a pointer to the source file ?


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