Github user brkyvz commented on a diff in the pull request:
https://github.com/apache/spark/pull/6531#discussion_r33109596
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/DataFrameStatFunctions.scala ---
@@ -35,6 +35,13 @@ final class DataFrameStatFunctions private[sql](df:
DataFrame) {
* @param col2 the name of the second column
* @return the covariance of the two columns.
*
+ * {{{
+ * import org.apache.spark.sql.functions._
+ * val df = sc.parallelize(0 until 10).toDF("id").withColumn("rand1",
rand(seed=10))
--- End diff --
had to change this to `sc.parallelize(...).toDF(...)` because
`sqlContext.createDataFrame(0 until 10)` doesn't work because it needs to be a
tuple I guess.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]