public class VectorUDT extends UserDefinedType<Vector>
User-defined type for Vector which allows easy interaction with SQL
via DataFrame.
NOTE: This is currently private[spark] but will be made public later once it is stabilized.
| Constructor and Description |
|---|
VectorUDT() |
| Modifier and Type | Method and Description |
|---|---|
VectorUDT |
asNullable()
For UDT, asNullable will not change the nullability of its internal sqlType and just returns
itself.
|
Vector |
deserialize(Object datum)
Convert a SQL datum to the user type
|
boolean |
equals(Object o) |
String |
pyUDT()
Paired Python UDT class, if exists.
|
Row |
serialize(Object obj)
Convert the user type to a SQL datum
|
StructType |
sqlType()
Underlying storage type for this UDT
|
Class<Vector> |
userClass()
Class object for the UserType
|
defaultSize, jsonValueequalsIgnoreCompatibleNullability, equalsIgnoreNullability, fromCaseClassString, fromJson, isPrimitive, json, prettyJson, sameType, simpleString, typeName, unapplypublic StructType sqlType()
UserDefinedTypesqlType in class UserDefinedType<Vector>public Row serialize(Object obj)
UserDefinedTypeTODO: Can we make this take obj: UserType? The issue is in ScalaReflection.convertToCatalyst, where we need to convert Any to UserType.
serialize in class UserDefinedType<Vector>public Vector deserialize(Object datum)
UserDefinedTypedeserialize in class UserDefinedType<Vector>public String pyUDT()
UserDefinedTypepyUDT in class UserDefinedType<Vector>public Class<Vector> userClass()
UserDefinedTypeuserClass in class UserDefinedType<Vector>public boolean equals(Object o)
equals in class Objectpublic VectorUDT asNullable()
UserDefinedTypeasNullable in class UserDefinedType<Vector>