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) 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.
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§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> ⓘ
Converts
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> ⓘ
Converts
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