pub enum RowAddrRemap {
Compact(CompactRowAddrRemap),
Direct(HashMap<u64, Option<u64>>),
}Expand description
A queryable row-address remapping with the exact semantics of
HashMap<u64, Option<u64>>::get(&addr).copied():
None— the address is not affected by this remap (keep it unchanged)Some(None)— the row was deletedSome(Some(addr))— the row moved toaddr
Variants§
Compact(CompactRowAddrRemap)
Compact, O(#fragments) remap built from per-group rewritten-row
bitmaps and new-fragment layouts.
Direct(HashMap<u64, Option<u64>>)
Full materialized old-to-new address map. Uses O(#rows) memory.
Implementations§
Source§impl RowAddrRemap
impl RowAddrRemap
pub fn compact(groups: impl IntoIterator<Item = GroupInput>) -> Result<Self>
Sourcepub fn direct(map: HashMap<u64, Option<u64>>) -> Self
pub fn direct(map: HashMap<u64, Option<u64>>) -> Self
Build a remap from a fully materialized old-to-new address map.
Sourcepub fn chained(remaps: impl IntoIterator<Item = Self>) -> Self
pub fn chained(remaps: impl IntoIterator<Item = Self>) -> Self
Build an ordered remap chain, flattening nested chains and omitting empty remaps.
Sourcepub fn get(&self, addr: u64) -> Option<Option<u64>>
pub fn get(&self, addr: u64) -> Option<Option<u64>>
Look up addr. See RowAddrRemap for the tri-state return semantics.
Sourcepub fn remap_in_place(&self, row_addrs: &mut [Option<u64>])
pub fn remap_in_place(&self, row_addrs: &mut [Option<u64>])
Apply this remap to a batch in place.
A None input remains deleted. An address missing from a remap remains
unchanged. Chained remaps are applied version-by-version so this path is
suitable for bulk index and transaction remapping without materializing
a composed per-row map.
pub fn is_empty(&self) -> bool
pub fn affected_fragments(&self) -> RoaringBitmap
pub fn fully_deleted_fragments(&self) -> Option<RoaringBitmap>
Trait Implementations§
Source§impl Clone for RowAddrRemap
impl Clone for RowAddrRemap
Source§fn clone(&self) -> RowAddrRemap
fn clone(&self) -> RowAddrRemap
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RowAddrRemap
impl Debug for RowAddrRemap
Source§impl DeepSizeOf for RowAddrRemap
impl DeepSizeOf for RowAddrRemap
fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of(&self) -> usize
impl Eq for RowAddrRemap
Source§impl PartialEq for RowAddrRemap
impl PartialEq for RowAddrRemap
impl StructuralPartialEq for RowAddrRemap
Auto Trait Implementations§
impl Freeze for RowAddrRemap
impl RefUnwindSafe for RowAddrRemap
impl Send for RowAddrRemap
impl Sync for RowAddrRemap
impl Unpin for RowAddrRemap
impl UnsafeUnpin for RowAddrRemap
impl UnwindSafe for RowAddrRemap
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.