Skip to content

Commit f542997

Browse files
committed
Added MIMA excludes for VectorUDT (now public), and added DeveloperApi annotation to it
1 parent 216d199 commit f542997

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import scala.collection.JavaConverters._
2626
import breeze.linalg.{DenseVector => BDV, SparseVector => BSV, Vector => BV}
2727

2828
import org.apache.spark.SparkException
29+
import org.apache.spark.annotation.DeveloperApi
2930
import org.apache.spark.mllib.util.NumericParser
3031
import org.apache.spark.sql.Row
3132
import org.apache.spark.sql.catalyst.expressions.GenericMutableRow
@@ -110,9 +111,12 @@ sealed trait Vector extends Serializable {
110111
}
111112

112113
/**
114+
* :: DeveloperApi ::
115+
*
113116
* User-defined type for [[Vector]] which allows easy interaction with SQL
114117
* via [[org.apache.spark.sql.DataFrame]].
115118
*/
119+
@DeveloperApi
116120
class VectorUDT extends UserDefinedType[Vector] {
117121

118122
override def sqlType: StructType = {

project/MimaExcludes.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ object MimaExcludes {
143143
"org.apache.spark.graphx.Graph.getCheckpointFiles"),
144144
ProblemFilters.exclude[MissingMethodProblem](
145145
"org.apache.spark.graphx.Graph.isCheckpointed")
146+
) ++ Seq(
147+
// SPARK-4789 Standardize ML Prediction APIs
148+
ProblemFilters.exclude[MissingTypesProblem]("org.apache.spark.mllib.linalg.VectorUDT"),
149+
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.mllib.linalg.VectorUDT.serialize"),
150+
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.mllib.linalg.VectorUDT.sqlType")
146151
)
147152

148153
case v if v.startsWith("1.2") =>

0 commit comments

Comments
 (0)