nxcals.api.common.utils.array_utils.ArrayType
- class nxcals.api.common.utils.array_utils.ArrayType(elementType: DataType, containsNull: bool = True)
Array data type.
- Parameters:
Examples
>>> from pyspark.sql.types import ArrayType, StringType, StructField, StructType
The below example demonstrates how to create class:ArrayType:
>>> arr = ArrayType(StringType())
The array can contain null (None) values by default:
>>> ArrayType(StringType()) == ArrayType(StringType(), True) True >>> ArrayType(StringType(), False) == ArrayType(StringType()) False
Methods
ArrayType.__init__(elementType[, containsNull])Converts an internal SQL object into a native Python object.
ArrayType.fromJson(json)Does this type needs conversion between Python object and internal SQL object.
ArrayType.toInternal(obj)Converts a Python object into an internal SQL object.