pub struct Snapshot { /* private fields */ }
Expand description
A snapshot of a Delta table
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub async fn try_new(
table_root: &Path,
store: Arc<dyn ObjectStore>,
config: DeltaTableConfig,
version: Option<i64>,
) -> DeltaResult<Self>
pub async fn try_new( table_root: &Path, store: Arc<dyn ObjectStore>, config: DeltaTableConfig, version: Option<i64>, ) -> DeltaResult<Self>
Create a new Snapshot
instance
Sourcepub async fn update(
&mut self,
log_store: Arc<dyn LogStore>,
target_version: Option<i64>,
) -> DeltaResult<()>
pub async fn update( &mut self, log_store: Arc<dyn LogStore>, target_version: Option<i64>, ) -> DeltaResult<()>
Update the snapshot to the given version
Sourcepub fn schema(&self) -> &StructType
pub fn schema(&self) -> &StructType
Get the table schema of the snapshot
Sourcepub fn load_config(&self) -> &DeltaTableConfig
pub fn load_config(&self) -> &DeltaTableConfig
Get the table config which is loaded with of the snapshot
Sourcepub fn table_root(&self) -> Path
pub fn table_root(&self) -> Path
Get the table root of the snapshot
Sourcepub fn table_config(&self) -> TableConfig<'_>
pub fn table_config(&self) -> TableConfig<'_>
Well known table configuration
Sourcepub fn files<'a>(
&self,
store: Arc<dyn ObjectStore>,
visitors: &'a mut Vec<Box<dyn ReplayVisitor>>,
) -> DeltaResult<ReplayStream<'a, BoxStream<'_, DeltaResult<RecordBatch>>>>
pub fn files<'a>( &self, store: Arc<dyn ObjectStore>, visitors: &'a mut Vec<Box<dyn ReplayVisitor>>, ) -> DeltaResult<ReplayStream<'a, BoxStream<'_, DeltaResult<RecordBatch>>>>
Get the files in the snapshot
Sourcepub fn stats_schema(
&self,
table_schema: Option<&StructType>,
) -> DeltaResult<StructType>
pub fn stats_schema( &self, table_schema: Option<&StructType>, ) -> DeltaResult<StructType>
Get the statistics schema of the snapshot
Sourcepub fn partitions_schema(
&self,
table_schema: Option<&StructType>,
) -> DeltaResult<Option<StructType>>
pub fn partitions_schema( &self, table_schema: Option<&StructType>, ) -> DeltaResult<Option<StructType>>
Get the partition values schema of the snapshot
Trait Implementations§
Source§impl DataFusionMixins for Snapshot
impl DataFusionMixins for Snapshot
Source§fn arrow_schema(&self) -> DeltaResult<ArrowSchemaRef>
fn arrow_schema(&self) -> DeltaResult<ArrowSchemaRef>
The physical datafusion schema of a table
Source§fn input_schema(&self) -> DeltaResult<ArrowSchemaRef>
fn input_schema(&self) -> DeltaResult<ArrowSchemaRef>
Get the table schema as an
ArrowSchemaRef
Source§fn parse_predicate_expression(
&self,
expr: impl AsRef<str>,
df_state: &SessionState,
) -> DeltaResult<Expr>
fn parse_predicate_expression( &self, expr: impl AsRef<str>, df_state: &SessionState, ) -> DeltaResult<Expr>
Parse an expression string into a datafusion
Expr
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 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,
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>
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