public class VectorUDT extends UserDefinedType<Vector>
User-defined type for Vector which allows easy interaction with SQL
via DataFrame.
| Constructor and Description |
|---|
VectorUDT() |
| Modifier and Type | Method and Description |
|---|---|
Vector |
deserialize(Object datum)
Convert a SQL datum to the user type
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
pyUDT()
Paired Python UDT class, if exists.
|
org.apache.spark.sql.catalyst.InternalRow |
serialize(Object obj)
Convert the user type to a SQL datum
|
StructType |
sqlType()
Underlying storage type for this UDT
|
String |
typeName()
Name of the type used in JSON serialization.
|
Class<Vector> |
userClass()
Class object for the UserType
|
defaultSize, serializedPyClassfromCaseClassString, fromJson, json, prettyJson, simpleStringpublic StructType sqlType()
UserDefinedTypesqlType in class UserDefinedType<Vector>public org.apache.spark.sql.catalyst.InternalRow serialize(Object obj)
UserDefinedTypeTODO: Can we make this take obj: UserType? The issue is in CatalystTypeConverters.convertToCatalyst, where we need to convert Any to UserType.
serialize in class UserDefinedType<Vector>obj - (undocumented)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 UserDefinedType<Vector>public int hashCode()
hashCode in class Object