Packages

object DataTypeUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataTypeUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def canWrite(tableName: String, write: DataType, read: DataType, byName: Boolean, resolver: Resolver, context: String, storeAssignmentPolicy: internal.SQLConf.StoreAssignmentPolicy.Value, addError: (String) => Unit): Boolean

    Returns true if the write data type can be read using the read data type.

    Returns true if the write data type can be read using the read data type.

    The write type is compatible with the read type if: - Both types are arrays, the array element types are compatible, and element nullability is compatible (read allows nulls or write does not contain nulls). - Both types are maps and the map key and value types are compatible, and value nullability is compatible (read allows nulls or write does not contain nulls). - Both types are structs and have the same number of fields. The type and nullability of each field from read/write is compatible. If byName is true, the name of each field from read/write needs to be the same. - Both types are atomic and the write type can be safely cast to the read type.

    Extra fields in write-side structs are not allowed to avoid accidentally writing data that the read schema will not read, and to ensure map key equality is not changed when data is read.

    write

    a write-side data type to validate against the read type

    read

    a read-side data type

    returns

    true if data written with the write type can be read using the read type

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def equalsIgnoreCaseAndNullability(from: DataType, to: DataType): Boolean

    Compares two types, ignoring nullability of ArrayType, MapType, StructType, and ignoring case sensitivity of field names in StructType.

  10. def equalsIgnoreNullability(left: DataType, right: DataType): Boolean

    Compares two types, ignoring nullability of ArrayType, MapType, StructType.

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. def fromAttributes(attributes: Seq[Attribute]): StructType
  13. def fromLiteral(literal: Literal): DecimalType

    Convert a literal to a DecimalType.

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def sameType(left: DataType, right: DataType): Boolean

    Check if this and other are the same data type when ignoring nullability (StructField.nullable, ArrayType.containsNull, and MapType.valueContainsNull).

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toAttribute(field: StructField): AttributeReference

    Convert a StructField to a AttributeReference.

  23. def toAttributes(schema: StructType): Seq[AttributeReference]

    Convert a StructType into a Seq of AttributeReference.

  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped