case class PreprocessTableMerge(conf: SQLConf) extends UpdateExpressionsSupport with Product with Serializable
- Alphabetic
- By Inheritance
- PreprocessTableMerge
- Serializable
- Serializable
- Product
- Equals
- UpdateExpressionsSupport
- CastSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PreprocessTableMerge(conf: SQLConf)
Type Members
-
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.
- Definition Classes
- UpdateExpressionsSupport
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(mergeInto: DeltaMergeInto): MergeIntoCommand
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cast(child: Expression, dataType: DataType): Cast
- Definition Classes
- CastSupport
-
def
castIfNeeded(child: Expression, dataType: DataType): Expression
- Attributes
- protected
- Definition Classes
- UpdateExpressionsSupport
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
conf: SQLConf
- Definition Classes
- PreprocessTableMerge → CastSupport
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateUpdateExpressions(targetCols: Seq[NamedExpression], nameParts: Seq[Seq[String]], updateExprs: Seq[Expression], resolver: Resolver): Seq[Expression]
- Attributes
- protected
- Definition Classes
- UpdateExpressionsSupport
-
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
targethas 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
- Definition Classes
- UpdateExpressionsSupport
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()