DeltaInvariantCheckerExec Unary Physical Operator¶
DeltaInvariantCheckerExec is an UnaryExecNode (Spark SQL) to assert constraints.
Creating Instance¶
DeltaInvariantCheckerExec takes the following to be created:
- Child
SparkPlan(Spark SQL) - Constraints
DeltaInvariantCheckerExec is created when:
TransactionalWriteis requested to write data out- DeltaInvariantCheckerStrategy execution planning strategy is executed
Executing Physical Operator¶
doExecute(): RDD[InternalRow]
doExecute is part of the SparkPlan (Spark SQL) abstraction.
doExecute builds invariants for the given constraints and applies (evaluates) them to every row from the child physical operator.
doExecute simply requests the child physical operator to execute (and becomes a noop) for no constraints.
Building Invariants¶
buildInvariantChecks(
output: Seq[Attribute],
constraints: Seq[Constraint],
spark: SparkSession): Seq[CheckDeltaInvariant]
buildInvariantChecks converts the given Constraints into CheckDeltaInvariants.