aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/test
diff options
context:
space:
mode:
authorCheng Lian <lian@databricks.com>2015-02-17 23:36:20 -0800
committerReynold Xin <rxin@databricks.com>2015-02-17 23:36:20 -0800
commit61ab08549cb6fceb6de1b5c490c55a89d4bd28fa (patch)
tree172480f72bb84b685b39acd1e744c84a5dc42d40 /mllib/src/test
parent3912d332464dcd124c60b734724c34d9742466a4 (diff)
downloadspark-61ab08549cb6fceb6de1b5c490c55a89d4bd28fa.tar.gz
spark-61ab08549cb6fceb6de1b5c490c55a89d4bd28fa.tar.bz2
spark-61ab08549cb6fceb6de1b5c490c55a89d4bd28fa.zip
[Minor] [SQL] Cleans up DataFrame variable names and toDF() calls
Although we've migrated to the DataFrame API, lots of code still uses `rdd` or `srdd` as local variable names. This PR tries to address these naming inconsistencies and some other minor DataFrame related style issues. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/apache/spark/4670) <!-- Reviewable:end --> Author: Cheng Lian <lian@databricks.com> Closes #4670 from liancheng/df-cleanup and squashes the following commits: 3e14448 [Cheng Lian] Cleans up DataFrame variable names and toDF() calls
Diffstat (limited to 'mllib/src/test')
-rw-r--r--mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
index b118a8dcf1..376c3626f9 100644
--- a/mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
@@ -358,8 +358,8 @@ class ALSSuite extends FunSuite with MLlibTestSparkContext with Logging {
.setNumUserBlocks(numUserBlocks)
.setNumItemBlocks(numItemBlocks)
val alpha = als.getAlpha
- val model = als.fit(training.toDF)
- val predictions = model.transform(test.toDF)
+ val model = als.fit(training.toDF())
+ val predictions = model.transform(test.toDF())
.select("rating", "prediction")
.map { case Row(rating: Float, prediction: Float) =>
(rating.toDouble, prediction.toDouble)