Skip to content

Commit

Permalink
Update Bitmap::len to return bits (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmturner authored Sep 9, 2021
1 parent 4221099 commit 9b77b4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arrow/src/bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Bitmap {
}

pub fn len(&self) -> usize {
self.bits.len()
self.bits.len() * 8
}

pub fn is_empty(&self) -> bool {
Expand Down Expand Up @@ -117,9 +117,9 @@ mod tests {

#[test]
fn test_bitmap_length() {
assert_eq!(64, Bitmap::new(63 * 8).len());
assert_eq!(64, Bitmap::new(64 * 8).len());
assert_eq!(128, Bitmap::new(65 * 8).len());
assert_eq!(512, Bitmap::new(63 * 8).len());
assert_eq!(512, Bitmap::new(64 * 8).len());
assert_eq!(1024, Bitmap::new(65 * 8).len());
}

#[test]
Expand Down

0 comments on commit 9b77b4b

Please sign in to comment.