Skip to content

Commit 0d0278a

Browse files
author
Nick Pentreath
committed
Fix compile issues due to SparkSession and mllib-local
1 parent 8d605d2 commit 0d0278a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ class ALSSuite
497497
(ex, act) =>
498498
ex.userFactors.first().getSeq[Float](1) === act.userFactors.first.getSeq[Float](1)
499499
} { (ex, act, _) =>
500-
ex.transform(_: DataFrame).select("prediction").first.getFloat(0) ~==
501-
act.transform(_: DataFrame).select("prediction").first.getFloat(0) absTol 1e-6
500+
ex.transform(_: DataFrame).select("prediction").first.getDouble(0) ~==
501+
act.transform(_: DataFrame).select("prediction").first.getDouble(0) absTol 1e-6
502502
}
503503
}
504504
// check user/item ids falling outside of Int range
@@ -541,8 +541,8 @@ class ALSSuite
541541
}
542542

543543
test("ALS unknown user/item prediction strategy") {
544-
val sqlContext = this.sqlContext
545-
import sqlContext.implicits._
544+
val spark = this.spark
545+
import spark.implicits._
546546
import org.apache.spark.sql.functions._
547547

548548
val (ratings, _) = genExplicitTestData(numUsers = 4, numItems = 4, rank = 1)

0 commit comments

Comments
 (0)