dbtsai commented on a change in pull request #24541: [SPARK-27646] [SQL] [WIP] 
Required refactoring for bytecode analysis
URL: https://github.com/apache/spark/pull/24541#discussion_r281381156
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/ScalaReflectionSuite.scala
 ##########
 @@ -250,58 +263,77 @@ class ScalaReflectionSuite extends SparkFunSuite {
           "nestedArrayField",
           ArrayType(ArrayType(IntegerType, containsNull = false), containsNull 
= true)))),
       nullable = true))
+    assert(schema1 === schema2)
   }
 
   test("generic data") {
-    val schema = schemaFor[GenericData[Int]]
-    assert(schema === Schema(
+    val d = GenericData(3)
+    val schema1 = schemaFor[GenericData[Int]]
+    val schema2 = schemaFor(d.getClass)
+
+    assert(schema1 === Schema(
       StructType(Seq(
         StructField("genericField", IntegerType, nullable = false))),
       nullable = true))
+    assert(schema1 === schema2)
+
   }
 
   test("tuple data") {
-    val schema = schemaFor[(Int, String)]
-    assert(schema === Schema(
+    val schema1 = schemaFor[(Int, String)]
+    val schema2 = schemaFor(classTag[(Int, String)].runtimeClass)
 
 Review comment:
   ditto

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to