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

    https://github.com/apache/spark/pull/11336#discussion_r82910308
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -2836,7 +2845,11 @@ setMethod("lpad", signature(x = "Column", len = 
"numeric", pad = "character"),
     setMethod("rand", signature(seed = "missing"),
               function(seed) {
                 jc <- callJStatic("org.apache.spark.sql.functions", "rand")
    -            column(jc)
    +
    +            # By assigning a one-row data.frame, the result of this 
function can be collected
    +            # returning a one-element Column
    +            df <- as.DataFrame(sparkRSQL.init(), data.frame(0))
    --- End diff --
    
    See my comment from March 30 to illustrate why this is needed. I'll change 
sparkRSQL.init() to sparkR.session(). Thanks for catching this!


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