pub fn rechunk(&mut self) -> &mut Self {
        let hb = RandomState::default();
        let hb2 = RandomState::with_seeds(392498, 98132457, 0, 412059);
        if self
            .columns
            .iter()
            // The idea is that we creat a hash of the chunk lengths.
            // Consisting of the combined hash + the sum (asumming collision probablility is nihil)
            // if not, we can add more hashes.
            // the old solution to this was clone all lengths to a vec and compare the vecs
            .map(|s| {
                s.chunk_lengths().map(|i| i as u64).fold(
                    (0u64, 0u64, s.n_chunks()),
                    |(lhash, lh2, n), rval| {
                        let mut h = hb.build_hasher();
                        rval.hash(&mut h);
                        let rhash = h.finish();
                        let mut h = hb2.build_hasher();
                        rval.hash(&mut h);
                        let rh2 = h.finish();
                        (
                            boost_hash_combine(lhash, rhash),
                            boost_hash_combine(lh2, rh2),
                            n,
                        )
                    },
                )
            })
            .all_equal()
        {
            self
        } else {
            self.as_single_chunk()
        }
    }
/// Ensure all the chunks in the DataFrame are aligned.
Ensure all the chunks in the DataFrame are aligned.
Ensure all the chunks in the DataFrame are aligned .
pub fn rechunk(&mut self) -> &mut Self {
        let hb = RandomState::default();
        let hb2 = RandomState::with_seeds(392498, 98132457, 0, 412059);
        if self
            .columns
            .iter()
            // The idea is that we creat a hash of the chunk lengths.
            // Consisting of the combined hash + the sum (asumming collision probablility is nihil)
            // if not, we can add more hashes.
            // the old solution to this was clone all lengths to a vec and compare the vecs
            .map(|s| {
                s.chunk_lengths().map(|i| i as u64).fold(
                    (0u64, 0u64, s.n_chunks()),
                    |(lhash, lh2, n), rval| {
                        let mut h = hb.build_hasher();
                        rval.hash(&mut h);
                        let rhash = h.finish();
                        let mut h = hb2.build_hasher();
                        rval.hash(&mut h);
                        let rh2 = h.finish();
                        (
                            boost_hash_combine(lhash, rhash),
                            boost_hash_combine(lh2, rh2),
                            n,
                        )
                    },
                )
            })
            .all_equal()
        {
            self
        } else {
            self.as_single_chunk()
        }
    }
pub fn rechunk ( & mut self ) -> & mut Self { let hb = RandomState :: default ( ) ; let hb2 = RandomState :: with_seeds ( 392498 , 98132457 , 0 , 412059 ) ; if self . columns . iter ( ) // The idea is that we creat a hash of the chunk lengths. // Consisting of the combined hash + the sum (asumming collision probablility is nihil) // if not, we can add more hashes. // the old solution to this was clone all lengths to a vec and compare the vecs . map ( | s | { s . chunk_lengths ( ) . map ( | i | i as u64 ) . fold ( ( 0u64 , 0u64 , s . n_chunks ( ) ) , | ( lhash , lh2 , n ) , rval | { let mut h = hb . build_hasher ( ) ; rval . hash ( & mut h ) ; let rhash = h . finish ( ) ; let mut h = hb2 . build_hasher ( ) ; rval . hash ( & mut h ) ; let rh2 = h . finish ( ) ; ( boost_hash_combine ( lhash , rhash ) , boost_hash_combine ( lh2 , rh2 ) , n , ) } , ) } ) . all_equal ( ) { self } else { self . as_single_chunk ( ) } }
Ensure all the chunks in the DataFrame are aligned.
Ensure all the chunks in the DataFrame are aligned .
&mut self