From 6fc1e72d9b70615bd91b598084406eb1893d6706 Mon Sep 17 00:00:00 2001 From: hyukjinkwon Date: Mon, 18 Apr 2016 13:45:03 -0700 Subject: [MINOR] Revert removing explicit typing (changed in some examples and StatFunctions) ## What changes were proposed in this pull request? This PR reverts some changes in https://github.com/apache/spark/pull/12413. (please see the discussion in that PR). from ```scala words.foreachRDD { (rdd, time) => ... ``` to ```scala words.foreachRDD { (rdd: RDD[String], time: Time) => ... ``` Also, this was discussed in dev-mailing list, [here](http://apache-spark-developers-list.1001551.n3.nabble.com/Question-about-Scala-style-explicit-typing-within-transformation-functions-and-anonymous-val-td17173.html) ## How was this patch tested? This was tested with `sbt scalastyle`. Author: hyukjinkwon Closes #12452 from HyukjinKwon/revert-explicit-typing. --- .../main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/core/src/main/scala/org/apache') diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala index 9afbd0e994..d603f63a08 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/stat/StatFunctions.scala @@ -431,7 +431,7 @@ private[sql] object StatFunctions extends Logging { s"exceed 1e4. Currently $columnSize") val table = counts.groupBy(_.get(0)).map { case (col1Item, rows) => val countsRow = new GenericMutableRow(columnSize + 1) - rows.foreach { row => + rows.foreach { (row: Row) => // row.get(0) is column 1 // row.get(1) is column 2 // row.get(2) is the frequency -- cgit v1.2.3