Skip to main content

apply_mutation_to_mir

Function apply_mutation_to_mir 

Source
fn apply_mutation_to_mir(
    expr: MirRelationExpr,
    kind: &MutationKind,
    assignments: &BTreeMap<usize, MirScalarExpr>,
) -> MirRelationExpr
Expand description

Transform a MIR expression to produce the appropriate diffs for a mutation.

  • DELETE: Negates the expression to produce (row, -1) diffs
  • UPDATE: Unions negated old rows with mapped new rows to produce both (old_row, -1) and (new_row, +1) diffs