Skip to content

Commit de986d6

Browse files
author
Davies Liu
committed
fix test
1 parent 83d65ac commit de986d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ object DataType {
144144

145145
case JSortedObject(
146146
("class", JString(udtClass)),
147-
("pyClass", JString(pyClass)),
147+
("pyClass", pyClass: JValue), // pyClass could be null, cannot match with JString()
148148
("sqlType", v: JValue),
149149
("type", JString("udt"))) =>
150150
if (udtClass.length > 0) {
151151
Utils.classForName(udtClass).newInstance().asInstanceOf[UserDefinedType[_]]
152152
} else {
153-
new PythonUserDefinedType(parseDataType(v), pyClass)
153+
new PythonUserDefinedType(parseDataType(v), pyClass.asInstanceOf[JString].values)
154154
}
155155
}
156156

0 commit comments

Comments
 (0)