Trait

org.apache.spark.sql.delta

UpdateExpressionsSupport

Related Doc: package delta

Permalink

trait UpdateExpressionsSupport extends CastSupport

Trait with helper functions to generate expressions to update target columns, even if they are nested fields.

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

Type Members

  1. case class UpdateOperation(targetColNameParts: Seq[String], updateExpr: Expression) extends Product with Serializable

    Permalink

    Specifies an operation that updates a target column with the given expression.

    Specifies an operation that updates a target column with the given expression. The target column may or may not be a nested field and it is specified as a full quoted name or as a sequence of split into parts.

Abstract Value Members

  1. abstract def conf: SQLConf

    Permalink
    Definition Classes
    CastSupport

Concrete 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 cast(child: Expression, dataType: DataType): Cast

    Permalink
    Definition Classes
    CastSupport
  6. def castIfNeeded(child: Expression, dataType: DataType): Expression

    Permalink
    Attributes
    protected
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def generateUpdateExpressions(targetCols: Seq[NamedExpression], nameParts: Seq[Seq[String]], updateExprs: Seq[Expression], resolver: Resolver): Seq[Expression]

    Permalink
    Attributes
    protected
  12. def generateUpdateExpressions(targetCols: Seq[NamedExpression], updateOps: Seq[UpdateOperation], resolver: Resolver, pathPrefix: Seq[String] = Nil): Seq[Expression]

    Permalink

    Given a list of target-column expressions and a set of update operations, generate a list of update expressions, which are aligned with given target-column expressions.

    Given a list of target-column expressions and a set of update operations, generate a list of update expressions, which are aligned with given target-column expressions.

    For update operations to nested struct fields, this method recursively walks down schema tree and apply the update expressions along the way. For example, assume table target has two attributes a and z, where a is of struct type with 3 fields: b, c and d, and z is of integer type.

    Given an update command:

    • UPDATE target SET a.b = 1, a.c = 2, z = 3

    this method works as follows:

    generateUpdateExpressions(targetCols=[a,z], updateOps=[(a.b, 1), (a.c, 2), (z, 3)]) generateUpdateExpressions(targetCols=[b,c,d], updateOps=[(b, 1),(c, 2)], pathPrefix=["a"]) end-of-recursion -> returns (1, 2, d) -> return ((1, 2, d), 3)

    targetCols

    a list of expressions to read named columns; these named columns can be either the top-level attributes of a table, or the nested fields of a StructType column.

    updateOps

    a set of update operations.

    pathPrefix

    the path from root to the current (nested) column. Only used for printing out full column path in error messages.

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from CastSupport

Inherited from AnyRef

Inherited from Any

Ungrouped