Skip to content

Commit

Permalink
Make sure not to overflow values in the the Statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Nov 25, 2024
1 parent e65d28f commit 2ab0773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roaring/src/bitmap/statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Statistics {
/// Number of values stored in run containers
pub n_values_run_containers: u32,
/// Number of values stored in bitset containers
pub n_values_bitset_containers: u32,
pub n_values_bitset_containers: u64,
/// Number of bytes used by array containers
pub n_bytes_array_containers: u64,
/// Number of bytes used by run containers
Expand Down Expand Up @@ -80,7 +80,7 @@ impl RoaringBitmap {
}
Store::Bitmap(bitmap) => {
cardinality += bitmap.len();
n_values_bitset_containers += bitmap.len() as u32;
n_values_bitset_containers += bitmap.len();
n_bytes_bitset_containers += bitmap.capacity() as u64;
n_bitset_containers += 1;
}
Expand Down

0 comments on commit 2ab0773

Please sign in to comment.