|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.sql.types.DataType org.apache.spark.sql.types.MapType
public class MapType
:: DeveloperApi ::
The data type for Maps. Keys in a map are not allowed to have 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 Summary | |
---|---|
MapType()
No-arg constructor for kryo. |
|
MapType(DataType keyType,
DataType valueType,
boolean valueContainsNull)
|
Method Summary | |
---|---|
static MapType |
apply(DataType keyType,
DataType valueType)
Construct a MapType object with the given key type and value type. |
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). |
DataType |
keyType()
|
String |
simpleString()
Readable string representation for the type. |
boolean |
valueContainsNull()
|
DataType |
valueType()
|
Methods inherited from class org.apache.spark.sql.types.DataType |
---|
fromCaseClassString, fromJson, json, prettyJson, typeName |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface scala.Product |
---|
productArity, productElement, productIterator, productPrefix |
Methods inherited from interface scala.Equals |
---|
canEqual, equals |
Constructor Detail |
---|
public MapType(DataType keyType, DataType valueType, boolean valueContainsNull)
public MapType()
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |