pub enum TableUpdate {
Show 15 variants
AssignUUID {
uuid: String,
},
UpgradeFormatVersion {
format_version: i32,
},
AddSchema {
schema: Schema,
last_column_id: Option<i32>,
},
SetCurrentSchema {
schema_id: i32,
},
AddPartitionSpec {
spec: PartitionSpec,
},
SetDefaultSpec {
spec_id: i32,
},
AddSortOrder {
sort_order: SortOrder,
},
SetDefaultSortOrder {
sort_order_id: i32,
},
AddSnapshot {
snapshot: Snapshot,
},
SetSnapshotRef {
ref_name: String,
snapshot_reference: SnapshotReference,
},
RemoveSnapshots {
snapshot_ids: Vec<i64>,
},
RemoveSnapshotRef {
ref_name: String,
},
SetLocation {
location: String,
},
SetProperties {
updates: HashMap<String, String>,
},
RemoveProperties {
removals: Vec<String>,
},
}
Expand description
Updates that can be applied to table metadata in a commit operation
This enum represents all possible modifications that can be made to table metadata:
- UUID assignment (only during table creation)
- Format version updates
- Schema modifications
- Partition spec and sort order changes
- Snapshot management (add, remove, set references)
- Location and property updates
Each variant includes the necessary data for that specific update type. Updates are applied atomically as part of a commit operation.
Variants§
AssignUUID
Assigning a UUID to a table/view should only be done when creating the table/view. It is not safe to re-assign the UUID if a table/view already has a UUID assigned
UpgradeFormatVersion
Update format version
AddSchema
The highest assigned column ID for the table. This is used to ensure columns are always assigned an unused ID when evolving schemas. When omitted, it will be computed on the server side.
SetCurrentSchema
Schema ID to set as current, or -1 to set last added schema
AddPartitionSpec
Add new partition spec
Fields
spec: PartitionSpec
New partition spec
SetDefaultSpec
Partition spec ID to set as the default, or -1 to set last added spec
AddSortOrder
Add a new sort order
SetDefaultSortOrder
Sort order ID to set as the default, or -1 to set last added sort order
AddSnapshot
Add a new snapshot
SetSnapshotRef
Set the current snapshot reference
Fields
snapshot_reference: SnapshotReference
Snapshot refernce to set
RemoveSnapshots
Remove snapshots with certain snapshot ids
RemoveSnapshotRef
Remove snapshot reference
SetLocation
Set a new location for the table
SetProperties
Set table properties
RemoveProperties
Remove table properties
Trait Implementations§
Source§impl Clone for TableUpdate
impl Clone for TableUpdate
Source§fn clone(&self) -> TableUpdate
fn clone(&self) -> TableUpdate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TableUpdate
impl Debug for TableUpdate
Source§impl<'de> Deserialize<'de> for TableUpdate
impl<'de> Deserialize<'de> for TableUpdate
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>,
Source§impl PartialEq for TableUpdate
impl PartialEq for TableUpdate
Source§impl Serialize for TableUpdate
impl Serialize for TableUpdate
impl StructuralPartialEq for TableUpdate
Auto Trait Implementations§
impl Freeze for TableUpdate
impl RefUnwindSafe for TableUpdate
impl Send for TableUpdate
impl Sync for TableUpdate
impl Unpin for TableUpdate
impl UnwindSafe for TableUpdate
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