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.
|
catalogString, equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, sql, typeName
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Class<?> cls()
public int defaultSize()
DataType
defaultSize
in class DataType
public DataType asNullable()
DataType
StructField.nullable
, ArrayType.containsNull
, and MapType.valueContainsNull
).public String simpleString()
DataType
simpleString
in class DataType
public 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)