public class MapType extends DataType implements scala.Product, scala.Serializable
null values.
Please use DataTypes.createMapType() to create a specific instance.
| 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. |
MapType |
asNullable()
Returns the same data type but set all nullability fields are true
(
StructField.nullable, ArrayType.containsNull, and MapType.valueContainsNull). |
void |
buildFormattedString(String prefix,
scala.collection.mutable.StringBuilder builder) |
int |
defaultSize()
The default size of a value of the MapType is
100 * (the default size of the key type + the default size of the value type).
|
org.json4s.JsonAST.JValue |
jsonValue() |
DataType |
keyType() |
String |
simpleString() |
boolean |
valueContainsNull() |
DataType |
valueType() |
equalsIgnoreCompatibleNullability, equalsIgnoreNullability, fromCaseClassString, fromJson, isPrimitive, json, prettyJson, sameType, typeName, unapplyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static MapType apply(DataType keyType, DataType valueType)
MapType object with the given key type and value type.
The valueContainsNull is true.public DataType keyType()
public DataType valueType()
public boolean valueContainsNull()
public void buildFormattedString(String prefix,
scala.collection.mutable.StringBuilder builder)
public int defaultSize()
defaultSize in class DataTypepublic String simpleString()
simpleString in class DataTypepublic MapType asNullable()
DataTypeStructField.nullable, ArrayType.containsNull, and MapType.valueContainsNull).asNullable in class DataType