Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/22785#discussion_r226979620
--- 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 --
Let me try it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]