Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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) =>
Expand Down
3 changes: 3 additions & 0 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably don't want to remove it in 2.1. can you just say "Use monotonically_increasing_id()"

def monotonicallyIncreasingId(): Column = monotonically_increasing_id()

/**
Expand Down