public class MapType extends DataType implements scala.Product, scala.Serializable
null
values.
Please use DataTypes.createMapType()
to create a specific instance.
param: keyType The data type of map keys.
param: valueType The data type of map values.
param: valueContainsNull Indicates if map values have null
values.
Constructor and Description |
---|
MapType()
No-arg constructor for kryo.
|
MapType(DataType keyType,
DataType valueType,
boolean valueContainsNull) |
Modifier and Type | Method and Description |
---|---|
static MapType |
apply(DataType keyType,
DataType valueType)
Construct a
MapType object with the given key type and value type. |
String |
catalogString()
String representation for the type saved in external catalogs.
|
int |
defaultSize()
The default size of a value of the MapType is
(the default size of the key type + the default size of the value type).
|
DataType |
keyType() |
String |
simpleString()
Readable string representation for the type.
|
String |
sql() |
boolean |
valueContainsNull() |
DataType |
valueType() |
equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, typeName
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static MapType apply(DataType keyType, DataType valueType)
MapType
object with the given key type and value type.
The valueContainsNull
is true.keyType
- (undocumented)valueType
- (undocumented)public DataType keyType()
public DataType valueType()
public boolean valueContainsNull()
public int defaultSize()
defaultSize
in class DataType
public String simpleString()
DataType
simpleString
in class DataType
public String catalogString()
DataType
catalogString
in class DataType