Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5858#discussion_r29545209
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/DataFrameStatSuite.scala ---
@@ -43,7 +43,15 @@ class DataFrameStatSuite extends FunSuite {
val singleColResults = df.stat.freqItems(Array("negDoubles"), 0.1)
val items2 = singleColResults.collect().head
items2.getSeq[Double](0) should contain (-1.0)
+ }
+ test("pearson correlation") {
+ val df = sqlCtx.sparkContext.parallelize(
+ Array.tabulate(10)(i => (i, 2 * i, i * -1.0))).toDF("a", "b", "c")
--- End diff --
fyi we have implicits to add toDF on Seq[Tuples], so you can just replace
Array with Seq, and then remove all the sparkContext.parallelize stuff. Maybe
do it for the frequent items above also.
---
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]