org.apache.spark.sql.types
Class DataType

Object
  extended by org.apache.spark.sql.types.DataType
Direct Known Subclasses:
ArrayType, BinaryType, BooleanType, DateType, MapType, NullType, NumericType, StringType, StructType, TimestampType, UserDefinedType

public abstract class DataType
extends Object

:: DeveloperApi :: The base type of all Spark SQL data types.


Constructor Summary
DataType()
           
 
Method Summary
abstract  int defaultSize()
          The default size of a value of this data type, used internally for size estimation.
static DataType fromCaseClassString(String string)
          Deprecated. As of 1.2.0, replaced by DataType.fromJson()
static DataType fromJson(String json)
           
 String json()
          The compact JSON representation of this data type.
 String prettyJson()
          The pretty (i.e.
 String simpleString()
          Readable string representation for the type.
 String typeName()
          Name of the type used in JSON serialization.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataType

public DataType()
Method Detail

fromJson

public static DataType fromJson(String json)

fromCaseClassString

public static DataType fromCaseClassString(String string)
Deprecated. As of 1.2.0, replaced by DataType.fromJson()

Parameters:
string - (undocumented)
Returns:
(undocumented)

defaultSize

public abstract int defaultSize()
The default size of a value of this data type, used internally for size estimation.

Returns:
(undocumented)

typeName

public String typeName()
Name of the type used in JSON serialization.


json

public String json()
The compact JSON representation of this data type.


prettyJson

public String prettyJson()
The pretty (i.e. indented) JSON representation of this data type.


simpleString

public String simpleString()
Readable string representation for the type.