package logical
- Alphabetic
- Public
- All
Type Members
- case class DeltaDelete(child: LogicalPlan, condition: Option[Expression]) extends UnaryNode with Product with Serializable
-
case class
DeltaMergeAction(targetColNameParts: Seq[String], expr: Expression) extends UnaryExpression with Unevaluable with Product with Serializable
Represents an action in MERGE's UPDATE or INSERT clause where a target columns is assigned the value of an expression
Represents an action in MERGE's UPDATE or INSERT clause where a target columns is assigned the value of an expression
- targetColNameParts
The name parts of the target column. This is a sequence to support nested fields as targets.
- expr
Expression to generate the value of the target column.
-
case class
DeltaMergeInto(target: LogicalPlan, source: LogicalPlan, condition: Expression, matchedClauses: Seq[DeltaMergeIntoMatchedClause], notMatchedClause: Option[DeltaMergeIntoInsertClause], migratedSchema: Option[StructType] = None) extends LogicalPlan with Command with Product with Serializable
Merges changes specified in the source plan into a target table, based on the given search condition and the actions to perform when the condition is matched or not matched by the rows.
Merges changes specified in the source plan into a target table, based on the given search condition and the actions to perform when the condition is matched or not matched by the rows.
The syntax of the MERGE statement is as follows.
MERGE INTO <target_table_with_alias> USING <source_table_with_alias> ON <search_condition> [ WHEN MATCHED [ AND <condition> ] THEN <matched_action> ] [ WHEN MATCHED [ AND <condition> ] THEN <matched_action> ] [ WHEN NOT MATCHED [ AND <condition> ] THEN <not_matched_action> ] where <matched_action> = DELETE | UPDATE SET column1 = value1 [, column2 = value2 ...] <not_matched_action> = INSERT (column1 [, column2 ...]) VALUES (expr1 [, expr2 ...])
- There can be 1, 2 or 3 WHEN clauses. Of these, at most 2 can be WHEN MATCHED clauses, and at most 1 can be WHEN NOT MATCHED clause. - WHEN MATCHED clauses:
- There can be at most one UPDATE action and DELETE action in the MATCHED clauses.
- Each WHEN MATCHED clause can have an optional condition. However, If there are two WHEN MATCHED clauses, then the first one must have a condition.
- When there are two MATCHED clauses and there are conditions (or the lack of) that allow a row to match both MATCHED clauses, then the first clause/action is executed. In other words, the order of the MATCHED clauses matter. - WHEN NOT MATCHED clause:
- Can only have the INSERT action. If present, it must be the last WHEN clause.
- WHEN NOT MATCHED clause can have an optional condition.
-
sealed
trait
DeltaMergeIntoClause extends Expression with Unevaluable
Trait that represents a WHEN clause in MERGE.
Trait that represents a WHEN clause in MERGE. See DeltaMergeInto. It extends Expression so that Catalyst can find all the expressions in the clause implementations.
-
case class
DeltaMergeIntoDeleteClause(condition: Option[Expression]) extends Expression with DeltaMergeIntoMatchedClause with Product with Serializable
Represents the clause WHEN MATCHED THEN DELETE in MERGE.
Represents the clause WHEN MATCHED THEN DELETE in MERGE. See DeltaMergeInto.
-
case class
DeltaMergeIntoInsertClause(condition: Option[Expression], actions: Seq[Expression]) extends Expression with DeltaMergeIntoClause with Product with Serializable
Represents the clause WHEN NOT MATCHED THEN INSERT in MERGE.
Represents the clause WHEN NOT MATCHED THEN INSERT in MERGE. See DeltaMergeInto.
-
sealed
trait
DeltaMergeIntoMatchedClause extends Expression with DeltaMergeIntoClause
Trait that represents WHEN MATCHED clause in MERGE.
Trait that represents WHEN MATCHED clause in MERGE. See DeltaMergeInto.
-
case class
DeltaMergeIntoUpdateClause(condition: Option[Expression], actions: Seq[Expression]) extends Expression with DeltaMergeIntoMatchedClause with Product with Serializable
Represents the clause WHEN MATCHED THEN UPDATE in MERGE.
Represents the clause WHEN MATCHED THEN UPDATE in MERGE. See DeltaMergeInto.
-
case class
DeltaUpdateTable(child: LogicalPlan, updateColumns: Seq[NamedExpression], updateExpressions: Seq[Expression], condition: Option[Expression]) extends UnaryNode with Product with Serializable
Perform UPDATE on a table
Perform UPDATE on a table
- child
the logical plan representing target table
Value Members
- object DeltaMergeInto extends Serializable
- object DeltaMergeIntoClause
- object DeltaUpdateTable extends Serializable