From d947be6b039aa3c4744b0be2c06c1bbb4c3500fc Mon Sep 17 00:00:00 2001 From: hyukjinkwon Date: Sun, 17 Jul 2016 17:17:53 +0900 Subject: [PATCH] Missed API fix for a function name mismatched between FunctionRegistry and functions.scala --- mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala | 4 ++-- sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala b/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala index 778cd0fee71c..034f2c3fa2fd 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala @@ -37,7 +37,7 @@ import org.apache.spark.mllib.linalg.MatrixImplicits._ import org.apache.spark.mllib.linalg.VectorImplicits._ import org.apache.spark.rdd.RDD import org.apache.spark.sql.{DataFrame, Dataset, Row, SparkSession} -import org.apache.spark.sql.functions.{col, monotonicallyIncreasingId, udf} +import org.apache.spark.sql.functions.{col, monotonically_increasing_id, udf} import org.apache.spark.sql.types.StructType @@ -888,7 +888,7 @@ object LDA extends DefaultParamsReadable[LDA] { dataset: Dataset[_], featuresCol: String): RDD[(Long, OldVector)] = { dataset - .withColumn("docId", monotonicallyIncreasingId()) + .withColumn("docId", monotonically_increasing_id()) .select("docId", featuresCol) .rdd .map { case Row(docId: Long, features: Vector) => diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index 45d5d05d9f3f..5712c401efcb 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -977,7 +977,10 @@ object functions { * * @group normal_funcs * @since 1.4.0 + * @deprecated As of 2.0.0, replaced by `monotonically_increasing_id`. This will be removed in + * Spark 2.1. */ + @deprecated("Use monotonically_increasing_id. This will be removed in Spark 2.1.", "2.0.0") def monotonicallyIncreasingId(): Column = monotonically_increasing_id() /**