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(java.lang.Object datum)
Convert a SQL datum to the user type
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
pyUDT()
Paired Python UDT class, if exists.
|
org.apache.spark.sql.catalyst.InternalRow |
serialize(java.lang.Object obj)
Convert the user type to a SQL datum
|
StructType |
sqlType()
Underlying storage type for this UDT
|
java.lang.String |
typeName()
Name of the type used in JSON serialization.
|
java.lang.Class<Vector> |
userClass()
Class object for the UserType
|
defaultSize, serializedPyClass
buildFormattedString, fromCaseClassString, fromJson, json, prettyJson, simpleString
public StructType sqlType()
UserDefinedType
sqlType
in class UserDefinedType<Vector>
public org.apache.spark.sql.catalyst.InternalRow serialize(java.lang.Object obj)
UserDefinedType
TODO: 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(java.lang.Object datum)
UserDefinedType
deserialize
in class UserDefinedType<Vector>
public java.lang.String pyUDT()
UserDefinedType
pyUDT
in class UserDefinedType<Vector>
public java.lang.Class<Vector> userClass()
UserDefinedType
userClass
in class UserDefinedType<Vector>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object