Packages

t

org.apache.spark.sql.delta

UpdateExpressionsSupport

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
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

    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
    Definition Classes
    CastSupport

Concrete 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 cast(child: Expression, dataType: DataType): Cast
    Definition Classes
    CastSupport
  6. def castIfNeeded(child: Expression, dataType: DataType): Expression
    Attributes
    protected
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[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]
    Attributes
    protected
  12. def generateUpdateExpressions(targetCols: Seq[NamedExpression], updateOps: Seq[UpdateOperation], resolver: Resolver, pathPrefix: Seq[String] = Nil): Seq[Expression]

    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[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from CastSupport

Inherited from AnyRef

Inherited from Any

Ungrouped