MergeIntoTable Logical Command¶
MergeIntoTable
is a BinaryCommand that represents MERGE INTO DML statement.
MergeIntoTable
is a SupportsSubquery (for the source).
Creating Instance¶
MergeIntoTable
takes the following to be created:
- Target Table (LogicalPlan)
- Source Table or Subquery (LogicalPlan)
- Merge Condition (Expression)
- Matched
MergeAction
s - Not-Matched
MergeAction
s - Not-Matched-by-Source
MergeAction
s
MergeIntoTable
is created when:
AstBuilder
is requested to parse MERGE INTO SQL statement
Execution Planning¶
MergeIntoTable
command is not supported in Spark SQL and BasicOperators execution planning strategy throws an UnsupportedOperationException
when finds any:
MERGE INTO TABLE is not supported temporarily.
Note
MergeIntoTable
is to allow custom connectors to support MERGE
SQL statement (and so does Delta Lake).