Skip to content

UserDefinedType

UserDefinedType[UserType] is an extension of the DataType abstraction for user-defined data types.

Contract

deserialize

deserialize(
  datum: Any): UserType

Used when:

  • UDTConverter is requested to toScala
  • Cast expression is requested to castToString
  • BaseScriptTransformationExec is requested to outputFieldWriters

serialize

serialize(
  obj: UserType): Any

Used when:

  • Row is requested to toJson
  • UDTConverter is requested to toCatalystImpl

sqlType

sqlType: DataType

The underlying storage DataType

userClass

userClass: Class[UserType]

Implementations

  • PythonUserDefinedType
  • MatrixUDT (Spark MLlib)
  • VectorUDT (Spark MLlib)