fn potential_overlap(&self, other: &Self) -> Result<bool> {
        // in order to have overlap, *all* the columns in the sort order
        // need to be the same. Note gaps in the sort order mean they
        // are for different parts of the keyspace
        if self.key_summaries.len() != other.key_summaries.len() {
            // Short circuit on different lengths
            return Ok(false);
        }

        let iter = self.key_summaries.iter().zip(other.key_summaries.iter());
        for (s1, s2) in iter {
            if s1.name != s2.name || !Self::columns_might_overlap(s1, s2)? {
                return Ok(false);
            }
        }

        Ok(true)
    }
/// Returns true if the chunk has a potential primary key overlap with the other chunk
Returns true if the chunk has a potential primary key overlap with the other chunk
Returns true if the chunk has a potential primary key overlap with the other chunk
fn potential_overlap(&self, other: &Self) -> Result<bool> {
        // in order to have overlap, *all* the columns in the sort order
        // need to be the same. Note gaps in the sort order mean they
        // are for different parts of the keyspace
        if self.key_summaries.len() != other.key_summaries.len() {
            // Short circuit on different lengths
            return Ok(false);
        }
        let iter = self.key_summaries.iter().zip(other.key_summaries.iter());
        for (s1, s2) in iter {
            if s1.name != s2.name || !Self::columns_might_overlap(s1, s2)? {
                return Ok(false);
            }
        }
        Ok(true)
    }
fn potential_overlap ( & self , other : & Self ) -> Result < bool > { // in order to have overlap, *all* the columns in the sort order // need to be the same. Note gaps in the sort order mean they // are for different parts of the keyspace if self . key_summaries . len ( ) != other . key_summaries . len ( ) { // Short circuit on different lengths return Ok ( false ) ; } let iter = self . key_summaries . iter ( ) . zip ( other . key_summaries . iter ( ) ) ; for ( s1 , s2 ) in iter { if s1 . name != s2 . name || ! Self :: columns_might_overlap ( s1 , s2 ) ? { return Ok ( false ) ; } } Ok ( true ) }
Returns true if the chunk has a potential primary key overlap with the other chunk
Returns true if the chunk has a potential primary key overlap with the other chunk
&self
other
&Self
&self
other
&Self