srowen commented on a change in pull request #28291:
URL: https://github.com/apache/spark/pull/28291#discussion_r413916278



##########
File path: 
mllib/src/test/scala/org/apache/spark/mllib/util/TestingUtilsSuite.scala
##########
@@ -457,4 +460,19 @@ class TestingUtilsSuite extends SparkFunSuite {
     assert(Matrices.sparse(2, 2, Array(0, 1, 2), Array(0, 1), Array(3.1, 3.5)) 
!~=
       Matrices.dense(0, 0, Array()) relTol 0.01)
   }
+
+  test("SPARK-31400, catalogString distinguish Vectors in ml and mllib") {
+    val schema = StructType(Array[StructField] {
+      StructField("features", new org.apache.spark.mllib.linalg.VectorUDT)
+    })
+    val e = intercept[IllegalArgumentException] {
+      SchemaUtils.checkColumnType(schema, "features", new VectorUDT)
+    }
+    assert(e.getMessage.contains("must be of type"), "class is not same")

Review comment:
       If you're going to write a test for it, I'd test for the presence of the 
class name, which is the point of the change




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to