Function mz_transform::source ·
fn reverse_permute<'a, I, J>(exprs: I, permutation: J)where
I: Iterator<Item = &'a mut MirScalarExpr>,
J: Iterator<Item = &'a usize>,
Applies the reverse of [MirScalarExpr.permute] on each expression.
permutation can be thought of as a mapping of column references from
stateB. [MirScalarExpr.permute] assumes that the column
references of the expression are in
stateA and need to be remapped to
stateB counterparts. This methods assumes that the column
references are in
stateB and need to be remapped to
outputs field of MirRelationExpr::Project is a mapping from “after”
to “before”. Thus, when lifting projections, you would permute on
but you need to reverse permute when pushing projections down.