pub struct EagerSnapshot { /* private fields */ }
Expand description
A snapshot of a Delta table that has been eagerly loaded into memory.
Implementations§
Source§impl EagerSnapshot
impl EagerSnapshot
Sourcepub fn datafusion_table_statistics(&self) -> Option<Statistics>
pub fn datafusion_table_statistics(&self) -> Option<Statistics>
Provide table level statistics to Datafusion
Source§impl EagerSnapshot
impl EagerSnapshot
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 EagerSnapshot
instance
Sourcepub async fn try_new_with_visitor(
table_root: &Path,
store: Arc<dyn ObjectStore>,
config: DeltaTableConfig,
version: Option<i64>,
tracked_actions: HashSet<ActionType>,
) -> DeltaResult<Self>
pub async fn try_new_with_visitor( table_root: &Path, store: Arc<dyn ObjectStore>, config: DeltaTableConfig, version: Option<i64>, tracked_actions: HashSet<ActionType>, ) -> DeltaResult<Self>
Create a new EagerSnapshot
instance
Sourcepub async fn update<'a>(
&mut self,
log_store: Arc<dyn LogStore>,
target_version: Option<i64>,
) -> DeltaResult<()>
pub async fn update<'a>( &mut self, log_store: Arc<dyn LogStore>, target_version: Option<i64>, ) -> DeltaResult<()>
Update the snapshot to the given version
Sourcepub fn version_timestamp(&self, version: i64) -> Option<i64>
pub fn version_timestamp(&self, version: i64) -> Option<i64>
Get the timestamp of the given version
Sourcepub fn schema(&self) -> &StructType
pub fn schema(&self) -> &StructType
Get the table schema of the snapshot
Sourcepub fn table_root(&self) -> Path
pub fn table_root(&self) -> Path
Get the table root 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_config(&self) -> TableConfig<'_>
pub fn table_config(&self) -> TableConfig<'_>
Well known table configuration
Sourcepub fn log_data(&self) -> LogDataHandler<'_>
pub fn log_data(&self) -> LogDataHandler<'_>
Get a LogDataHandler
for the snapshot to inspect the currently loaded state of the log.
Sourcepub fn files_count(&self) -> usize
pub fn files_count(&self) -> usize
Get the number of files in the snapshot
Sourcepub fn file_actions(&self) -> DeltaResult<impl Iterator<Item = Add> + '_>
pub fn file_actions(&self) -> DeltaResult<impl Iterator<Item = Add> + '_>
Get the files in the snapshot
Sourcepub fn files(&self) -> impl Iterator<Item = LogicalFile<'_>>
pub fn files(&self) -> impl Iterator<Item = LogicalFile<'_>>
Get a file action iterator for the given version
Sourcepub fn cdc_files(&self) -> DeltaResult<impl Iterator<Item = AddCDCFile> + '_>
pub fn cdc_files(&self) -> DeltaResult<impl Iterator<Item = AddCDCFile> + '_>
Get an iterator for the CDC files added in this version
Sourcepub fn transactions(
&self,
) -> DeltaResult<impl Iterator<Item = Transaction> + '_>
pub fn transactions( &self, ) -> DeltaResult<impl Iterator<Item = Transaction> + '_>
Iterate over all latest app transactions
Sourcepub fn advance<'a>(
&mut self,
commits: impl IntoIterator<Item = &'a CommitData>,
) -> DeltaResult<i64>
pub fn advance<'a>( &mut self, commits: impl IntoIterator<Item = &'a CommitData>, ) -> DeltaResult<i64>
Advance the snapshot based on the given commit actions
Trait Implementations§
Source§impl Clone for EagerSnapshot
impl Clone for EagerSnapshot
Source§fn clone(&self) -> EagerSnapshot
fn clone(&self) -> EagerSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl DataFusionMixins for EagerSnapshot
impl DataFusionMixins for EagerSnapshot
Source§fn arrow_schema(&self) -> DeltaResult<ArrowSchemaRef>
fn arrow_schema(&self) -> DeltaResult<ArrowSchemaRef>
Source§fn input_schema(&self) -> DeltaResult<ArrowSchemaRef>
fn input_schema(&self) -> DeltaResult<ArrowSchemaRef>
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>
Expr
Source§impl Debug for EagerSnapshot
impl Debug for EagerSnapshot
Source§impl<'de> Deserialize<'de> for EagerSnapshot
impl<'de> Deserialize<'de> for EagerSnapshot
Source§fn deserialize<D>(deserializer: D) -> Result<EagerSnapshot, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<EagerSnapshot, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for EagerSnapshot
impl PartialEq for EagerSnapshot
Source§impl PruningStatistics for EagerSnapshot
impl PruningStatistics for EagerSnapshot
Source§fn min_values(&self, column: &Column) -> Option<ArrayRef>
fn min_values(&self, column: &Column) -> Option<ArrayRef>
return the minimum values for the named column, if known.
Note: the returned array must contain num_containers()
rows
Source§fn max_values(&self, column: &Column) -> Option<ArrayRef>
fn max_values(&self, column: &Column) -> Option<ArrayRef>
return the maximum values for the named column, if known.
Note: the returned array must contain num_containers()
rows.
Source§fn num_containers(&self) -> usize
fn num_containers(&self) -> usize
return the number of containers (e.g. row groups) being pruned with these statistics
Source§fn null_counts(&self, column: &Column) -> Option<ArrayRef>
fn null_counts(&self, column: &Column) -> Option<ArrayRef>
return the number of null values for the named column as an
Option<UInt64Array>
.
Note: the returned array must contain num_containers()
rows.
Source§fn row_counts(&self, column: &Column) -> Option<ArrayRef>
fn row_counts(&self, column: &Column) -> Option<ArrayRef>
return the number of rows for the named column in each container
as an Option<UInt64Array>
.
Note: the returned array must contain num_containers()
rows
Source§fn contained(
&self,
column: &Column,
value: &HashSet<ScalarValue>,
) -> Option<BooleanArray>
fn contained( &self, column: &Column, value: &HashSet<ScalarValue>, ) -> Option<BooleanArray>
BooleanArray
where each row represents information known
about specific literal values
in a column. Read moreSource§impl Serialize for EagerSnapshot
impl Serialize for EagerSnapshot
Source§impl TableReference for EagerSnapshot
impl TableReference for EagerSnapshot
Source§fn config(&self) -> TableConfig<'_>
fn config(&self) -> TableConfig<'_>
Source§fn eager_snapshot(&self) -> &EagerSnapshot
fn eager_snapshot(&self) -> &EagerSnapshot
EagerSnapshot
impl StructuralPartialEq for EagerSnapshot
Auto Trait Implementations§
impl Freeze for EagerSnapshot
impl !RefUnwindSafe for EagerSnapshot
impl Send for EagerSnapshot
impl Sync for EagerSnapshot
impl Unpin for EagerSnapshot
impl !UnwindSafe for EagerSnapshot
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