Class

za.co.absa.spark.commons.implicits.StructTypeImplicits

StructTypeEnhancements

Related Doc: package StructTypeImplicits

Permalink

implicit class StructTypeEnhancements extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StructTypeEnhancements
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StructTypeEnhancements(schema: StructType)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def diffSchema(other: StructType, parent: String = ""): Seq[String]

    Permalink

    Returns a list of differences in one utils to the other

    Returns a list of differences in one utils to the other

    other

    The second utils to compare

    parent

    Parent path. Should be left default by the users first run. This is used for the accumulation of differences and their print out.

    returns

    Returns a Seq of paths to differences in schemas

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def evaluateConditionsForField(structField: StructType, path: Seq[String], fieldPathName: String, applyArrayHelper: Boolean, applyLeafCondition: Boolean = false, conditionLeafSh: (StructType) ⇒ Boolean = _ => false): Boolean

    Permalink
    Attributes
    protected
  10. def fieldExists(path: String): Boolean

    Permalink

    Checks if a field specified by a path and a utils exists

    Checks if a field specified by a path and a utils exists

    path

    The dot-separated path to the field

    returns

    True if the field exists false otherwise

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def getAllArrayPaths(): Seq[String]

    Permalink

    Get paths for all array fields in the utils

    Get paths for all array fields in the utils

    returns

    Seq of dot separated paths of fields in the utils, which are of type Array

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getClosestUniqueName(desiredName: String): String

    Permalink

    Get a closest unique column name

    Get a closest unique column name

    desiredName

    A prefix to use for the column name

    returns

    A name that can be used as a unique column name

  15. def getDataFrameSelector(): List[Column]

    Permalink

    Returns data selector that can be used to align utils of a data frame.

    Returns data selector that can be used to align utils of a data frame. You can use alignSchema.

    returns

    Sorted DF to conform to utils

  16. def getField(path: String): Option[StructField]

    Permalink

    Get a field from a text path and a given utils

    Get a field from a text path and a given utils

    path

    The dot-separated path to the field

    returns

    Some(the requested field) or None if the field does not exist

  17. def getFieldNullability(path: String): Option[Boolean]

    Permalink

    Get nullability of a field from a text path and a given utils

    Get nullability of a field from a text path and a given utils

    path

    The dot-separated path to the field

    returns

    Some(nullable) or None if the field does not exist

  18. def getFieldType(path: String): Option[DataType]

    Permalink

    Get a type of a field from a text path and a given utils

    Get a type of a field from a text path and a given utils

    path

    The dot-separated path to the field

    returns

    Some(the type of the field) or None if the field does not exist

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def isColumnArrayOfStruct(path: String): Boolean

    Permalink

    Checks if the specified path is an array of structs

    Checks if the specified path is an array of structs

    path

    The dot-separated path to the field

    returns

    true if the field is an array of structs

  21. def isEquivalent(other: StructType): Boolean

    Permalink

    Compares 2 dataframe schemas.

    Compares 2 dataframe schemas.

    other

    The second utils to compare

    returns

    true if provided schemas are the same ignoring nullability

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def isOfType[T <: DataType](path: String)(implicit ev: ClassTag[T]): Boolean

    Permalink
  24. def isOnlyField(path: String): Boolean

    Permalink

    Checks if a field is the only field in a struct

    Checks if a field is the only field in a struct

    path

    A column to check

    returns

    true if the column is the only column in a struct

  25. def isSubset(originalSchema: StructType): Boolean

    Permalink

    Checks if the originalSchema is a subset of subsetSchema.

    Checks if the originalSchema is a subset of subsetSchema.

    originalSchema

    The utils that needs to have at least all t

    returns

    true if provided schemas are the same ignoring nullability

  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. val schema: StructType

    Permalink
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped