// Handles finding all rows that match the provided operator on `value`.
// For performance reasons ranges of matching values are collected up and
// added in bulk to the bitmap.
Handles finding all rows that match the provided operator on `value`.
For performance reasons ranges of matching values are collected up and
added in bulk to the bitmap.
Handles finding all rows that match the provided operator on ` value ` . For performance reasons ranges of matching values are collected up and added in bulk to the bitmap .
fn row_ids_equal(&self, value: P::Native, op: &cmp::Operator, mut dst: RowIDs) -> RowIDs {
        dst.clear();
        let desired = matches!(op, cmp::Operator::Equal);
        let mut found = false;
        let mut count = 0;
        for i in 0..self.num_rows() as usize {
            let cmp_result = self.arr.value(i) == value;
            if (self.arr.is_null(i) || cmp_result != desired) && found {
                let (min, max) = (i as u32 - count, i as u32);
                dst.add_range(min, max);
                found = false;
                count = 0;
                continue;
            } else if self.arr.is_null(i) || cmp_result != desired {
                continue;
            }
            if !found {
                found = true;
            }
            count += 1;
        }
        // add any remaining range.
        if found {
            let (min, max) = (self.num_rows() - count, self.num_rows());
            dst.add_range(min, max);
        }
        dst
    }
fn row_ids_equal ( & self , value : P :: Native , op : & cmp :: Operator , mut dst : RowIDs ) -> RowIDs { dst . clear ( ) ; let desired = matches ! ( op cmp Operator Equal ) ; let mut found = false ; let mut count = 0 ; for i in 0 .. self . num_rows ( ) as usize { let cmp_result = self . arr . value ( i ) == value ; if ( self . arr . is_null ( i ) || cmp_result != desired ) && found { let ( min , max ) = ( i as u32 - count , i as u32 ) ; dst . add_range ( min , max ) ; found = false ; count = 0 ; continue ; } else if self . arr . is_null ( i ) || cmp_result != desired { continue ; } if ! found { found = true ; } count += 1 ; } // add any remaining range. if found { let ( min , max ) = ( self . num_rows ( ) - count , self . num_rows ( ) ) ; dst . add_range ( min , max ) ; } dst }
Handles finding all rows that match the provided operator on `value`.
Handles finding all rows that match the provided operator on ` value ` .
&self
value
P::Native
op
&cmp::Operator
dst
RowIDs