Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Clone on the bitmap::Iter type #289

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

Kerollmops
Copy link
Member

No description provided.


/// Detailed statistics on the composition of a bitmap.
#[derive(Clone, Copy, PartialEq, Debug)]
pub struct Statistics {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth a #[non_exhaustive], to be able to add fields backwards-compatibly.

}
Store::Bitmap(bitmap) => {
cardinality += bitmap.len();
n_values_bitset_containers += bitmap.len() as u32;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could theoretically overflow n_values_bitset_containers if you have a full bitmap. Not sure if that's a problem or not.

If we ever implement run containers, that's much more likely, since it'd take much less memory to hold a totally full bitmap of all full run containers

@@ -30,6 +30,10 @@ impl ArrayStore {
ArrayStore { vec: Vec::with_capacity(capacity) }
}

pub fn capacity(&self) -> usize {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd at least need to document that this is the capacity of containers, not the capacity of values, or maybe have a different name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants