File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
mllib/src/test/scala/org/apache/spark/ml/feature Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ import org.apache.spark.mllib.util.MLlibTestSparkContext
2424import org .apache .spark .mllib .util .TestingUtils ._
2525import org .apache .spark .sql .{DataFrame , Row , SQLContext }
2626
27- private case class DataSet2 (features : Vector )
28-
2927class PolynomialMapperSuite extends FunSuite with MLlibTestSparkContext {
3028
3129 @ transient var data : Array [Vector ] = _
@@ -56,7 +54,8 @@ class PolynomialMapperSuite extends FunSuite with MLlibTestSparkContext {
5654 )
5755
5856 val sqlContext = new SQLContext (sc)
59- dataFrame = sqlContext.createDataFrame(sc.parallelize(data, 2 ).map(DataSet2 ))
57+ dataFrame = sqlContext
58+ .createDataFrame(sc.parallelize(data, 2 ).map(Tuple1 .apply)).toDF(" features" )
6059 polynomialMapper = new PolynomialMapper ()
6160 .setInputCol(" features" )
6261 .setOutputCol(" poly_features" )
You can’t perform that action at this time.
0 commit comments