Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22785#discussion_r226977568
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/RowEncoderSuite.scala
 ---
    @@ -273,6 +273,16 @@ class RowEncoderSuite extends 
CodegenInterpretedPlanTest {
         assert(e4.getMessage.contains("java.lang.String is not a valid 
external type"))
       }
     
    +  test("SPARK-25791: Datatype of serializers should be accessible") {
    +    val udtSQLType = new StructType().add("a", IntegerType)
    +    val pythonUDT = new PythonUserDefinedType(udtSQLType, "pyUDT", 
"serializedPyClass")
    +    val schema = new StructType().add("pythonUDT", pythonUDT, true)
    +    val encoder = RowEncoder(schema)
    +    // scalastyle:off println
    +    encoder.serializer.foreach(s => println(s.dataType))
    --- End diff --
    
    we shouldn't print in a test, can we use assert?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to