pub fn permute(&mut self, mut shuffle: HashMap<usize, usize>, new_input_arity: usize) {
        let (mut map, mut filter, mut project) = self.as_map_filter_project();
        for index in 0..map.len() {
            // Intermediate columns are just shifted.
            shuffle.insert(self.input_arity + index, new_input_arity + index);
        }
        for expr in map.iter_mut() {
            expr.permute_map(&shuffle);
        }
        for pred in filter.iter_mut() {
            pred.permute_map(&shuffle);
        }
        for proj in project.iter_mut() {
            *proj = shuffle[proj];
        }
        *self = Self::new(new_input_arity)
            .map(map)
            .filter(filter)
            .project(project)
    }
/// Update input column references, due to an input projection or permutation.
///
/// The `shuffle` argument remaps expected column identifiers to new locations,
/// with the expectation that `shuffle` describes all input columns, and so the
/// intermediate results will be able to start at position `shuffle.len()`.
///
/// The supplied `shuffle` may not list columns that are not "demanded" by the
/// instance, and so we should ensure that `self` is optimized to not reference
/// columns that are not demanded.
Update input column references, due to an input projection or permutation.

The supplied `shuffle` may not list columns that are not "demanded" by the
instance, and so we should ensure that `self` is optimized to not reference
columns that are not demanded.
Update input column references due to an input projection or permutation . The supplied ` shuffle ` may not list columns that are not " demanded " by the instance and so we should ensure that ` self ` is optimized to not reference columns that are not demanded .
pub fn permute(&mut self, mut shuffle: HashMap<usize, usize>, new_input_arity: usize) {
        let (mut map, mut filter, mut project) = self.as_map_filter_project();
        for index in 0..map.len() {
            // Intermediate columns are just shifted.
            shuffle.insert(self.input_arity + index, new_input_arity + index);
        }
        for expr in map.iter_mut() {
            expr.permute_map(&shuffle);
        }
        for pred in filter.iter_mut() {
            pred.permute_map(&shuffle);
        }
        for proj in project.iter_mut() {
            *proj = shuffle[proj];
        }
        *self = Self::new(new_input_arity)
            .map(map)
            .filter(filter)
            .project(project)
    }
pub fn permute ( & mut self , mut shuffle : HashMap < usize , usize > , new_input_arity : usize ) { let ( mut map , mut filter , mut project ) = self . as_map_filter_project ( ) ; for index in 0 .. map . len ( ) { // Intermediate columns are just shifted. shuffle . insert ( self . input_arity + index , new_input_arity + index ) ; } for expr in map . iter_mut ( ) { expr . permute_map ( & shuffle ) ; } for pred in filter . iter_mut ( ) { pred . permute_map ( & shuffle ) ; } for proj in project . iter_mut ( ) { * proj = shuffle [ proj ] ; } * self = Self :: new ( new_input_arity ) . map ( map ) . filter ( filter ) . project ( project ) }
Update input column references, due to an input projection or permutation.
Update input column references due to an input projection or permutation .
&mut self
shuffle
HashMap<usize, usize>
new_input_arity
usize
&mut self
shuffle
HashMap<usize, usize>
new_input_arity
usize