pub struct Snapshot {
pub snapshot_id: i64,
pub parent_snapshot_id: Option<i64>,
pub sequence_number: i64,
pub timestamp_ms: i64,
pub operation: Operation,
pub manifest_list: String,
pub summary: HashMap<String, String>,
pub schema_id: i32,
}Expand description
A snapshot represents an immutable view of the table at a point in time.
Each snapshot contains a reference to a manifest list, which in turn references all the data files that make up the table at that point.
§Lineage
Snapshots form a tree structure through parent references, allowing tracking of table lineage and enabling features like rollback.
Fields§
§snapshot_id: i64Unique identifier for this snapshot.
parent_snapshot_id: Option<i64>The ID of the parent snapshot, if any. The first snapshot has no parent (None).
sequence_number: i64Monotonically increasing sequence number. Used to order operations across snapshots.
timestamp_ms: i64Timestamp when this snapshot was created (ms since epoch).
operation: OperationThe operation that created this snapshot.
manifest_list: StringPath to the manifest list file for this snapshot.
summary: HashMap<String, String>Summary statistics and operation metadata.
schema_id: i32The schema ID used for this snapshot’s data.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn builder(
snapshot_id: i64,
manifest_list: impl Into<String>,
) -> SnapshotBuilder
pub fn builder( snapshot_id: i64, manifest_list: impl Into<String>, ) -> SnapshotBuilder
Creates a new snapshot builder.
Sourcepub fn summary_property(&self, key: &str) -> Option<&str>
pub fn summary_property(&self, key: &str) -> Option<&str>
Returns the value of a summary property.
Sourcepub fn added_files_count(&self) -> Option<i64>
pub fn added_files_count(&self) -> Option<i64>
Returns the added files count from the summary.
Sourcepub fn added_records_count(&self) -> Option<i64>
pub fn added_records_count(&self) -> Option<i64>
Returns the added records count from the summary.
Sourcepub fn total_files_count(&self) -> Option<i64>
pub fn total_files_count(&self) -> Option<i64>
Returns the total files count from the summary.
Sourcepub fn total_records_count(&self) -> Option<i64>
pub fn total_records_count(&self) -> Option<i64>
Returns the total records count from the summary.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more