Struct TableMetadataBuilder

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

Builder for TableMetadata.

Implementations§

Source§

impl TableMetadataBuilder

Source

pub fn format_version(&mut self, value: FormatVersion) -> &mut Self

Integer Version for the format.

Source

pub fn table_uuid(&mut self, value: Uuid) -> &mut Self

A UUID that identifies the table

Source

pub fn location<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Location tables base location

Source

pub fn last_sequence_number(&mut self, value: i64) -> &mut Self

The tables highest sequence number

Source

pub fn last_updated_ms(&mut self, value: i64) -> &mut Self

Timestamp in milliseconds from the unix epoch when the table was last updated.

Source

pub fn last_column_id(&mut self, value: i32) -> &mut Self

An integer; the highest assigned column ID for the table.

Source

pub fn schemas(&mut self, value: HashMap<i32, Schema>) -> &mut Self

A list of schemas, stored as objects with schema-id.

Source

pub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut Self
where HashMap<i32, Schema>: Default + Extend<VALUE>,

A list of schemas, stored as objects with schema-id.

Source

pub fn current_schema_id(&mut self, value: i32) -> &mut Self

ID of the table’s current schema.

Source

pub fn partition_specs( &mut self, value: HashMap<i32, PartitionSpec>, ) -> &mut Self

A list of partition specs, stored as full partition spec objects.

Source

pub fn with_partition_spec<VALUE>(&mut self, item: VALUE) -> &mut Self

A list of partition specs, stored as full partition spec objects.

Source

pub fn default_spec_id(&mut self, value: i32) -> &mut Self

ID of the “current” spec that writers should use by default.

Source

pub fn last_partition_id(&mut self, value: i32) -> &mut Self

An integer; the highest assigned partition field ID across all partition specs for the table.

Source

pub fn properties(&mut self, value: HashMap<String, String>) -> &mut Self

A string to string map of table properties. This is used to control settings that affect reading and writing and is not intended to be used for arbitrary metadata. For example, commit.retry.num-retries is used to control the number of commit retries.

Source

pub fn current_snapshot_id(&mut self, value: Option<i64>) -> &mut Self

long ID of the current table snapshot; must be the same as the current ID of the main branch in refs.

Source

pub fn snapshots(&mut self, value: HashMap<i64, Snapshot>) -> &mut Self

A list of valid snapshots. Valid snapshots are snapshots for which all data files exist in the file system. A data file must not be deleted from the file system until the last snapshot in which it was listed is garbage collected.

Source

pub fn snapshot_log(&mut self, value: Vec<SnapshotLog>) -> &mut Self

A list (optional) of timestamp and snapshot ID pairs that encodes changes to the current snapshot for the table. Each time the current-snapshot-id is changed, a new entry should be added with the last-updated-ms and the new current-snapshot-id. When snapshots are expired from the list of valid snapshots, all entries before a snapshot that has expired should be removed.

Source

pub fn metadata_log(&mut self, value: Vec<MetadataLog>) -> &mut Self

A list (optional) of timestamp and metadata file location pairs that encodes changes to the previous metadata files for the table. Each time a new metadata file is created, a new entry of the previous metadata file location should be added to the list. Tables can be configured to remove oldest metadata log entries and keep a fixed-size log of the most recent entries after a commit.

Source

pub fn sort_orders(&mut self, value: HashMap<i32, SortOrder>) -> &mut Self

A list of sort orders, stored as full sort order objects.

Source

pub fn with_sort_order<VALUE>(&mut self, item: VALUE) -> &mut Self
where HashMap<i32, SortOrder>: Default + Extend<VALUE>,

A list of sort orders, stored as full sort order objects.

Source

pub fn default_sort_order_id(&mut self, value: i32) -> &mut Self

Default sort order id of the table. Note that this could be used by writers, but is not used when reading because reads use the specs stored in manifest files.

Source

pub fn refs(&mut self, value: HashMap<String, SnapshotReference>) -> &mut Self

A map of snapshot references. The map keys are the unique snapshot reference names in the table, and the map values are snapshot reference objects. There is always a main branch reference pointing to the current-snapshot-id even if the refs map is null.

Source

pub fn build(&self) -> Result<TableMetadata, TableMetadataBuilderError>

Builds a new TableMetadata.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for TableMetadataBuilder

Source§

fn clone(&self) -> TableMetadataBuilder

Returns a duplicate 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 Default for TableMetadataBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. 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, dest: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T