Class ArrayType

Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.ArrayType
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product, scala.Serializable

public class ArrayType extends DataType implements scala.Product, scala.Serializable
See Also:
  • Constructor Details

    • ArrayType

      public ArrayType(DataType elementType, boolean containsNull)
  • Method Details

    • apply

      public static ArrayType apply(DataType elementType)
      Construct a ArrayType object with the given element type. The containsNull is true.
      Parameters:
      elementType - (undocumented)
      Returns:
      (undocumented)
    • elementType

      public DataType elementType()
    • containsNull

      public boolean containsNull()
    • defaultSize

      public int defaultSize()
      The default size of a value of the ArrayType is the default size of the element type. We assume that there is only 1 element on average in an array. See SPARK-18853.
      Specified by:
      defaultSize in class DataType
      Returns:
      (undocumented)
    • simpleString

      public String simpleString()
      Description copied from class: DataType
      Readable string representation for the type.
      Overrides:
      simpleString in class DataType
    • catalogString

      public String catalogString()
      Description copied from class: DataType
      String representation for the type saved in external catalogs.
      Overrides:
      catalogString in class DataType
    • sql

      public String sql()
      Overrides:
      sql in class DataType