pub struct DataOverlayFile {
pub data_file: Option<DataFile>,
pub committed_version: u64,
pub coverage: Option<Coverage>,
}Expand description
An overlay file supplies new values for a subset of (row offset, field) cells within a fragment, without rewriting the fragment’s base data files. It is used for efficient updates when only a small fraction of rows and/or columns change.
On read, a cell is resolved by consulting the fragment’s overlays from newest to oldest: the first overlay that covers that (offset, field) wins; if none cover it, the value falls through to the base data file. Because deletions take precedence over overlays, an overlay value for an offset that is also marked deleted is dead and is ignored.
The overlay’s data file does NOT store a row-offset key column. Within a value column, the position of a covered offset’s value is the rank (0-based count of set bits below it) of that offset within the field’s coverage bitmap. Because fields may cover different offset sets, the value columns of a single overlay data file may have different lengths (which the Lance file format permits).
Fields§
§data_file: Option<DataFile>The data file storing the overlay’s new cell values, one value column per
field in data_file.fields. No row-offset key column is stored.
committed_version: u64The dataset version at which this overlay became effective: the version of the commit that introduced it, NOT the version it was read from. It is stamped at commit time and re-stamped if the commit is retried, in the same way as the created-at / last-updated-at version sequences.
This drives two orderings:
- Versus index builds: an index whose
dataset_version>= this value already incorporates this overlay. Otherwise the overlay’s covered cells are excluded from index results for the affected fields and re-evaluated against their current values (see the Data Overlay Files specification). - Versus other overlays: when two overlays cover the same (offset, field),
the one with the higher
committed_versionwins. Overlays that share acommitted_versionare ordered by their position inDataFragment.overlays, where a later entry is newer and wins.
coverage: Option<Coverage>Which (offset, field) cells this overlay provides values for.
Trait Implementations§
Source§impl Clone for DataOverlayFile
impl Clone for DataOverlayFile
Source§fn clone(&self) -> DataOverlayFile
fn clone(&self) -> DataOverlayFile
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 DataOverlayFile
impl Debug for DataOverlayFile
Source§impl Default for DataOverlayFile
impl Default for DataOverlayFile
impl Eq for DataOverlayFile
Source§impl Hash for DataOverlayFile
impl Hash for DataOverlayFile
Source§impl Message for DataOverlayFile
impl Message for DataOverlayFile
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for DataOverlayFile
impl PartialEq for DataOverlayFile
impl StructuralPartialEq for DataOverlayFile
Auto Trait Implementations§
impl Freeze for DataOverlayFile
impl RefUnwindSafe for DataOverlayFile
impl Send for DataOverlayFile
impl Sync for DataOverlayFile
impl Unpin for DataOverlayFile
impl UnsafeUnpin for DataOverlayFile
impl UnwindSafe for DataOverlayFile
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.