Class: DataTypes

eclairjs/sql/types.DataTypes

The base type of all Spark SQL data types.

Constructor

new DataTypes()

Source:

Members

(static) BooleanType

Gets the BooleanType object.
Source:

(static) DateType

Gets the DateType object.
Source:

(static) DoubleType

Gets the DoubleType object.
Source:

(static) FloatType

Gets the DoubleType object. Note: JavaScript float types are mapped to DoubleTypes in Spark, The user should use the DoubleType for all float processing
Source:

(static) IntegerType

Gets the IntegerType object.
Source:

(static) StringType

Gets the StringType object.
Source:

(static) TimestampType

Gets the TimestampType object.
Source:

Methods

(static) createArrayType(elementType, containsNullopt) → {module:eclairjs/sql/types.ArrayType}

Creates an ArrayType by specifying the data type of elements (elementType) and whether the array contains null values (containsNull).
Parameters:
Name Type Attributes Description
elementType module:eclairjs/sql/types.DataType
containsNull boolean <optional>
Source:
Returns:
Type
module:eclairjs/sql/types.ArrayType

(static) createStructField(fieldName, dataType, nullable) → {module:eclairjs/sql/types.StructField}

Creates a StructField with empty metadata.
Parameters:
Name Type Description
fieldName String
dataType DataType
nullable boolean
Source:
Returns:
Type
module:eclairjs/sql/types.StructField

(static) createStructType(fields) → {module:eclairjs/sql/types.StructType}

Creates a StructType with the given StructField array (fields).
Parameters:
Name Type Description
fields Array
Source:
Returns:
Type
module:eclairjs/sql/types.StructType