deltalake_core::kernel

Struct EagerSnapshot

Source
pub struct EagerSnapshot { /* private fields */ }
Expand description

A snapshot of a Delta table that has been eagerly loaded into memory.

Implementations§

Source§

impl EagerSnapshot

Source

pub fn datafusion_table_statistics(&self) -> Option<Statistics>

Provide table level statistics to Datafusion

Source§

impl EagerSnapshot

Source

pub async fn try_new( table_root: &Path, store: Arc<dyn ObjectStore>, config: DeltaTableConfig, version: Option<i64>, ) -> DeltaResult<Self>

Create a new EagerSnapshot instance

Source

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

Source

pub async fn update<'a>( &mut self, log_store: Arc<dyn LogStore>, target_version: Option<i64>, ) -> DeltaResult<()>

Update the snapshot to the given version

Source

pub fn version(&self) -> i64

Get the table version of the snapshot

Source

pub fn version_timestamp(&self, version: i64) -> Option<i64>

Get the timestamp of the given version

Source

pub fn schema(&self) -> &StructType

Get the table schema of the snapshot

Source

pub fn metadata(&self) -> &Metadata

Get the table metadata of the snapshot

Source

pub fn protocol(&self) -> &Protocol

Get the table protocol of the snapshot

Source

pub fn table_root(&self) -> Path

Get the table root of the snapshot

Source

pub fn load_config(&self) -> &DeltaTableConfig

Get the table config which is loaded with of the snapshot

Source

pub fn table_config(&self) -> TableConfig<'_>

Well known table configuration

Source

pub fn log_data(&self) -> LogDataHandler<'_>

Get a LogDataHandler for the snapshot to inspect the currently loaded state of the log.

Source

pub fn files_count(&self) -> usize

Get the number of files in the snapshot

Source

pub fn file_actions(&self) -> DeltaResult<impl Iterator<Item = Add> + '_>

Get the files in the snapshot

Source

pub fn files(&self) -> impl Iterator<Item = LogicalFile<'_>>

Get a file action iterator for the given version

Source

pub fn cdc_files(&self) -> DeltaResult<impl Iterator<Item = AddCDCFile> + '_>

Get an iterator for the CDC files added in this version

Source

pub fn transactions( &self, ) -> DeltaResult<impl Iterator<Item = Transaction> + '_>

Iterate over all latest app transactions

Source

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

Source§

fn clone(&self) -> EagerSnapshot

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl DataFusionMixins for EagerSnapshot

Source§

fn arrow_schema(&self) -> DeltaResult<ArrowSchemaRef>

The physical datafusion schema of a table
Source§

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>

Parse an expression string into a datafusion Expr
Source§

impl Debug for EagerSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EagerSnapshot

Source§

fn deserialize<D>(deserializer: D) -> Result<EagerSnapshot, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EagerSnapshot

Source§

fn eq(&self, other: &EagerSnapshot) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PruningStatistics for EagerSnapshot

Source§

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>

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

return the number of containers (e.g. row groups) being pruned with these statistics

Source§

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>

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>

Returns BooleanArray where each row represents information known about specific literal values in a column. Read more
Source§

impl Serialize for EagerSnapshot

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TableReference for EagerSnapshot

Source§

fn protocol(&self) -> &Protocol

Get the table protocol of the snapshot
Source§

fn metadata(&self) -> &Metadata

Get the table metadata of the snapshot
Source§

fn config(&self) -> TableConfig<'_>

Well known table configuration
Source§

fn eager_snapshot(&self) -> &EagerSnapshot

Try to cast this table reference to a EagerSnapshot
Source§

impl StructuralPartialEq for EagerSnapshot

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T