public class ObjectType extends DataType implements scala.Product, scala.Serializable
| Constructor and Description |
|---|
ObjectType(Class<?> cls) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsType(DataType other)
Returns true if
other is an acceptable input type for a function that expects this,
possibly abstract DataType. |
DataType |
asNullable()
Returns the same data type but set all nullability fields are true
(
StructField.nullable, ArrayType.containsNull, and MapType.valueContainsNull). |
Class<?> |
cls() |
int |
defaultSize()
The default size of a value of this data type, used internally for size estimation.
|
String |
simpleString()
Readable string representation for the type.
|
canWrite, catalogString, equalsStructurally, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, sql, typeNameequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic Class<?> cls()
public int defaultSize()
DataTypedefaultSize in class DataTypepublic DataType asNullable()
DataTypeStructField.nullable, ArrayType.containsNull, and MapType.valueContainsNull).public String simpleString()
DataTypesimpleString in class DataTypepublic boolean acceptsType(DataType other)
other is an acceptable input type for a function that expects this,
possibly abstract DataType.
// this should return true
DecimalType.acceptsType(DecimalType(10, 2))
// this should return true as well
NumericType.acceptsType(DecimalType(10, 2))
other - (undocumented)