MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / permute_order

Function permute_order

src/transform/src/join_implementation.rs:994–1005  ·  view source on GitHub ↗

Permute the keys in `order` to compensate for projections being lifted from inputs. `lifted_projections` has an optional projection for each input.

(
    order: &mut Vec<(usize, Vec<MirScalarExpr>, Option<JoinInputCharacteristics>)>,
    lifted_projections: &Vec<Option<Vec<usize>>>,
)

Source from the content-addressed store, hash-verified

992/// Permute the keys in `order` to compensate for projections being lifted from inputs.
993/// `lifted_projections` has an optional projection for each input.
994fn permute_order(
995 order: &mut Vec<(usize, Vec<MirScalarExpr>, Option<JoinInputCharacteristics>)>,
996 lifted_projections: &Vec<Option<Vec<usize>>>,
997) {
998 order.iter_mut().for_each(|(index, key, _)| {
999 key.iter_mut().for_each(|kc| {
1000 if let Some(proj) = &lifted_projections[*index] {
1001 kc.permute(proj);
1002 }
1003 })
1004 })
1005}
1006
1007// Computes the best join orders for each input.
1008//

Callers 1

planFunction · 0.85

Calls 1

permuteMethod · 0.45

Tested by

no test coverage detected