pub struct Snapshot { /* private fields */ }Expand description
A snapshot represents the state of a table at some time and is used to access the complete set of data files in the table.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn builder() -> SnapshotBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> SnapshotBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building Snapshot.
On the builder, call .snapshot_id(...), .parent_snapshot_id(...)(optional), .sequence_number(...), .timestamp_ms(...), .manifest_list(...), .summary(...), .schema_id(...)(optional), .encryption_key_id(...)(optional), .row_range(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Snapshot.
Source§impl Snapshot
impl Snapshot
Sourcepub fn snapshot_id(&self) -> i64
pub fn snapshot_id(&self) -> i64
Get the id of the snapshot
Sourcepub fn parent_snapshot_id(&self) -> Option<i64>
pub fn parent_snapshot_id(&self) -> Option<i64>
Get parent snapshot id.
Sourcepub fn sequence_number(&self) -> i64
pub fn sequence_number(&self) -> i64
Get sequence_number of the snapshot. Is 0 for Iceberg V1 tables.
Sourcepub fn manifest_list(&self) -> &str
pub fn manifest_list(&self) -> &str
Get location of manifest_list file
Sourcepub fn timestamp(&self) -> Result<DateTime<Utc>>
pub fn timestamp(&self) -> Result<DateTime<Utc>>
Get the timestamp of when the snapshot was created
Sourcepub fn timestamp_ms(&self) -> i64
pub fn timestamp_ms(&self) -> i64
Get the timestamp of when the snapshot was created in milliseconds
Sourcepub fn schema(&self, table_metadata: &TableMetadata) -> Result<SchemaRef>
pub fn schema(&self, table_metadata: &TableMetadata) -> Result<SchemaRef>
Get the schema of this snapshot.
Sourcepub async fn load_manifest_list(
&self,
file_io: &FileIO,
table_metadata: &TableMetadata,
) -> Result<ManifestList>
pub async fn load_manifest_list( &self, file_io: &FileIO, table_metadata: &TableMetadata, ) -> Result<ManifestList>
Load manifest list.
Sourcepub fn first_row_id(&self) -> Option<u64>
pub fn first_row_id(&self) -> Option<u64>
The row-id of the first newly added row in this snapshot. All rows added in this snapshot will have a row-id assigned to them greater than this value. All rows with a row-id less than this value were created in a snapshot that was added to the table (but not necessarily committed to this branch) in the past.
This field is optional but is required when the table version supports row lineage.
Sourcepub fn added_rows_count(&self) -> Option<u64>
pub fn added_rows_count(&self) -> Option<u64>
The total number of newly added rows in this snapshot. It should be the summation of {@link ManifestFile#ADDED_ROWS_COUNT} for every manifest added in this snapshot.
This field is optional but is required when the table version supports row lineage.
Sourcepub fn row_range(&self) -> Option<(u64, u64)>
pub fn row_range(&self) -> Option<(u64, u64)>
Returns the row range of this snapshot, if available. This is a tuple containing (first_row_id, added_rows_count).
Sourcepub fn encryption_key_id(&self) -> Option<&str>
pub fn encryption_key_id(&self) -> Option<&str>
Get encryption key id, if available.
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
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,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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