deltalake_core::protocol

Enum DeltaOperation

Source
pub enum DeltaOperation {
Show 16 variants AddColumn { fields: Vec<StructField>, }, Create { mode: SaveMode, location: String, protocol: Protocol, metadata: Metadata, }, Write { mode: SaveMode, partition_by: Option<Vec<String>>, predicate: Option<String>, }, Delete { predicate: Option<String>, }, Update { predicate: Option<String>, }, AddConstraint { name: String, expr: String, }, AddFeature { name: Vec<TableFeatures>, }, DropConstraint { name: String, }, Merge { predicate: Option<String>, merge_predicate: Option<String>, matched_predicates: Vec<MergePredicate>, not_matched_predicates: Vec<MergePredicate>, not_matched_by_source_predicates: Vec<MergePredicate>, }, StreamingUpdate { output_mode: OutputMode, query_id: String, epoch_id: i64, }, SetTableProperties { properties: HashMap<String, String>, }, Optimize { predicate: Option<String>, target_size: i64, }, FileSystemCheck {}, Restore { version: Option<i64>, datetime: Option<i64>, }, VacuumStart { retention_check_enabled: bool, specified_retention_millis: Option<i64>, default_retention_millis: i64, }, VacuumEnd { status: String, },
}
Expand description

Operation performed when creating a new log entry with one or more actions. This is a key element of the CommitInfo action.

Variants§

§

AddColumn

Represents a Delta Add Column operation. Used to add new columns or field in a struct

Fields

§fields: Vec<StructField>

Fields added to existing schema

§

Create

Represents a Delta Create operation. Would usually only create the table, if also data is written, a Write operations is more appropriate

Fields

§mode: SaveMode

The save mode used during the create.

§location: String

The storage location of the new table

§protocol: Protocol

The min reader and writer protocol versions of the table

§metadata: Metadata

Metadata associated with the new table

§

Write

Represents a Delta Write operation. Write operations will typically only include Add actions.

Fields

§mode: SaveMode

The save mode used during the write.

§partition_by: Option<Vec<String>>

The columns the write is partitioned by.

§predicate: Option<String>

The predicate used during the write.

§

Delete

Delete data matching predicate from delta table

Fields

§predicate: Option<String>

The condition the to be deleted data must match

§

Update

Update data matching predicate from delta table

Fields

§predicate: Option<String>

The update predicate

§

AddConstraint

Add constraints to a table

Fields

§name: String

Constraints name

§expr: String

Expression to check against

§

AddFeature

Add table features to a table

Fields

§name: Vec<TableFeatures>

Name of the feature

§

DropConstraint

Drops constraints from a table

Fields

§name: String

Constraints name

§

Merge

Merge data with a source data with the following predicate

Fields

§predicate: Option<String>

Cleaned merge predicate for conflict checks

§merge_predicate: Option<String>

The original merge predicate

§matched_predicates: Vec<MergePredicate>

Match operations performed

§not_matched_predicates: Vec<MergePredicate>

Not Match operations performed

§not_matched_by_source_predicates: Vec<MergePredicate>

Not Match by Source operations performed

§

StreamingUpdate

Represents a Delta StreamingUpdate operation.

Fields

§output_mode: OutputMode

The output mode the streaming writer is using.

§query_id: String

The query id of the streaming writer.

§epoch_id: i64

The epoch id of the written micro-batch.

§

SetTableProperties

Set table properties operations

Fields

§properties: HashMap<String, String>

Table properties that were added

§

Optimize

Represents a Optimize operation

Fields

§predicate: Option<String>

The filter used to determine which partitions to filter

§target_size: i64

Target optimize size

§

FileSystemCheck

Represents a FileSystemCheck operation

§

Restore

Represents a Restore operation

Fields

§version: Option<i64>

Version to restore

§datetime: Option<i64>

Datetime to restore

§

VacuumStart

Represents the start of Vacuum operation

Fields

§retention_check_enabled: bool

Whether the retention check is enforced

§specified_retention_millis: Option<i64>

The specified retetion period in milliseconds

§default_retention_millis: i64

The default delta table retention milliseconds policy

§

VacuumEnd

Represents the end of Vacuum operation

Fields

§status: String

The status of the operation

Implementations§

Source§

impl DeltaOperation

Source

pub fn name(&self) -> &str

A human readable name for the operation

Source

pub fn operation_parameters(&self) -> DeltaResult<HashMap<String, Value>>

Parameters configured for operation.

Source

pub fn changes_data(&self) -> bool

Denotes if the operation changes the data contained in the table

Source

pub fn get_commit_info(&self) -> CommitInfo

Retrieve basic commit information to be added to Delta commits

Source

pub fn read_predicate(&self) -> Option<String>

Get predicate expression applied when the operation reads data from the table.

Source

pub fn read_whole_table(&self) -> bool

Denotes if the operation reads the entire table

Trait Implementations§

Source§

impl Clone for DeltaOperation

Source§

fn clone(&self) -> DeltaOperation

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 Debug for DeltaOperation

Source§

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

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

impl<'de> Deserialize<'de> for DeltaOperation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

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

impl Serialize for DeltaOperation

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

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> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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