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

Builder for TableMetadata.

Implementations§

source§

impl TableMetadataBuilder

source

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

Integer Version for the format.

source

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

A UUID that identifies the table

source

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

Location tables base location

source

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

The tables highest sequence number

source

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

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

source

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

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

source

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

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

source

pub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut TableMetadataBuilder
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 TableMetadataBuilder

ID of the table’s current schema.

source

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

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

source

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

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

source

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

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

source

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

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 TableMetadataBuilder

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 TableMetadataBuilder

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 TableMetadataBuilder

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 TableMetadataBuilder

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 TableMetadataBuilder

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 TableMetadataBuilder

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

source

pub fn with_sort_order<VALUE>( &mut self, item: VALUE ) -> &mut TableMetadataBuilder
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 TableMetadataBuilder

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 TableMetadataBuilder

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 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 Default for TableMetadataBuilder

source§

fn default() -> TableMetadataBuilder

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> 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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,