Struct lance_core::utils::mask::RowIdTreeMap
source · pub struct RowIdTreeMap { /* private fields */ }Expand description
A collection of row ids.
This is similar to a [RoaringTreemap] but it is optimized for the case where entire fragments are selected or deselected.
Implementations§
source§impl RowIdTreeMap
impl RowIdTreeMap
pub fn is_empty(&self) -> bool
sourcepub fn len(&self) -> Option<u64>
pub fn len(&self) -> Option<u64>
The number of rows in the map
If there are any “full fragment” items then this is unknown and None is returned
sourcepub fn row_ids(&self) -> Option<impl Iterator<Item = RowAddress> + '_>
pub fn row_ids(&self) -> Option<impl Iterator<Item = RowAddress> + '_>
An iterator of row ids
If there are any “full fragment” items then this can’t be calculated and None is returned
sourcepub fn insert_bitmap(&mut self, fragment: u32, bitmap: RoaringBitmap)
pub fn insert_bitmap(&mut self, fragment: u32, bitmap: RoaringBitmap)
Add a bitmap for a single fragment
sourcepub fn insert_fragment(&mut self, fragment_id: u32)
pub fn insert_fragment(&mut self, fragment_id: u32)
Add a whole fragment to the set
pub fn remove_fragments(&mut self, frag_ids: impl IntoIterator<Item = u32>)
sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Compute the serialized size of the set.
sourcepub fn serialize_into<W: Write>(&self, writer: W) -> Result<()>
pub fn serialize_into<W: Write>(&self, writer: W) -> Result<()>
Serialize the set into the given buffer
The serialization format is not stable.
The serialization format is:
- u32: num_entries
for each entry:
- u32: fragment_id
- u32: bitmap size
If bitmap size is zero then the entire fragment is selected.
sourcepub fn deserialize_from<R: Read>(reader: R) -> Result<Self>
pub fn deserialize_from<R: Read>(reader: R) -> Result<Self>
Deserialize the set from the given buffer
Trait Implementations§
source§impl BitAnd for RowIdTreeMap
impl BitAnd for RowIdTreeMap
source§impl BitOr for RowIdTreeMap
impl BitOr for RowIdTreeMap
source§impl Clone for RowIdTreeMap
impl Clone for RowIdTreeMap
source§fn clone(&self) -> RowIdTreeMap
fn clone(&self) -> RowIdTreeMap
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RowIdTreeMap
impl Debug for RowIdTreeMap
source§impl Default for RowIdTreeMap
impl Default for RowIdTreeMap
source§fn default() -> RowIdTreeMap
fn default() -> RowIdTreeMap
Returns the “default value” for a type. Read more
source§impl<'a> Extend<&'a u64> for RowIdTreeMap
impl<'a> Extend<&'a u64> for RowIdTreeMap
source§fn extend<T: IntoIterator<Item = &'a u64>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = &'a u64>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<u64> for RowIdTreeMap
impl Extend<u64> for RowIdTreeMap
source§fn extend<T: IntoIterator<Item = u64>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = u64>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<'a> FromIterator<&'a u64> for RowIdTreeMap
impl<'a> FromIterator<&'a u64> for RowIdTreeMap
source§impl FromIterator<u64> for RowIdTreeMap
impl FromIterator<u64> for RowIdTreeMap
source§impl PartialEq for RowIdTreeMap
impl PartialEq for RowIdTreeMap
source§fn eq(&self, other: &RowIdTreeMap) -> bool
fn eq(&self, other: &RowIdTreeMap) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for RowIdTreeMap
Auto Trait Implementations§
impl Freeze for RowIdTreeMap
impl RefUnwindSafe for RowIdTreeMap
impl Send for RowIdTreeMap
impl Sync for RowIdTreeMap
impl Unpin for RowIdTreeMap
impl UnwindSafe for RowIdTreeMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more