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>>>,
)
| 992 | /// Permute the keys in `order` to compensate for projections being lifted from inputs. |
| 993 | /// `lifted_projections` has an optional projection for each input. |
| 994 | fn 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 | // |