pub struct GeneralViewMetadata<T>
where T: Clone + Default,
{ pub view_uuid: Uuid, pub format_version: FormatVersion, pub location: String, pub current_version_id: i64, pub versions: HashMap<i64, Version>, pub version_log: Vec<VersionLogStruct>, pub schemas: HashMap<i32, Schema>, pub properties: ViewProperties<T>, }
Expand description

Fields for the version 1 of the view metadata.

Fields§

§view_uuid: Uuid

A UUID that identifies the view, generated when the view is created. Implementations must throw an exception if a view’s UUID does not match the expected UUID after refreshing metadata

§format_version: FormatVersion

An integer version number for the view format; must be 1

§location: String

The view’s base location. This is used to determine where to store manifest files and view metadata files.

§current_version_id: i64

Current version of the view. Set to ‘1’ when the view is first created.

§versions: HashMap<i64, Version>

An array of structs describing the last known versions of the view. Controlled by the table property: “version.history.num-entries”. See section Versions.

§version_log: Vec<VersionLogStruct>

A list of timestamp and version ID pairs that encodes changes to the current version for the view. Each time the current-version-id is changed, a new entry should be added with the last-updated-ms and the new current-version-id.

§schemas: HashMap<i32, Schema>

A list of schemas, the same as the ‘schemas’ field from Iceberg table spec.

§properties: ViewProperties<T>

A string to string map of view properties. This is used for metadata such as “comment” and for settings that affect view maintenance. This is not intended to be used for arbitrary metadata.

Implementations§

source§

impl<T> GeneralViewMetadata<T>
where T: Clone + Default,

source

pub fn current_schema(&self, branch: Option<&str>) -> Result<&Schema, Error>

Get current schema

source

pub fn schema(&self, version_id: i64) -> Result<&Schema, Error>

Get schema for version

source

pub fn current_version( &self, snapshot_ref: Option<&str> ) -> Result<&Version, Error>

Get current version

source

pub fn add_schema(&mut self, schema: Schema)

Add schema to view metadata

Trait Implementations§

source§

impl<T> Clone for GeneralViewMetadata<T>
where T: Clone + Default,

source§

fn clone(&self) -> GeneralViewMetadata<T>

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<T> Debug for GeneralViewMetadata<T>
where T: Debug + Clone + Default,

source§

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

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

impl<T> Default for GeneralViewMetadata<T>
where T: Default + Clone,

source§

fn default() -> GeneralViewMetadata<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for GeneralViewMetadata<T>
where T: Clone + Default + Deserialize<'de>,

source§

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

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

impl<'a> From<&'a GeneralViewMetadata<Option<()>>> for TabularMetadataRef<'a>

source§

fn from(value: &'a GeneralViewMetadata<Option<()>>) -> TabularMetadataRef<'a>

Converts to this type from the input type.
source§

impl<'a> From<&'a GeneralViewMetadata<String>> for TabularMetadataRef<'a>

source§

fn from(value: &'a GeneralViewMetadata<String>) -> TabularMetadataRef<'a>

Converts to this type from the input type.
source§

impl From<GeneralViewMetadata<Option<()>>> for TabularMetadata

source§

fn from(value: GeneralViewMetadata<Option<()>>) -> TabularMetadata

Converts to this type from the input type.
source§

impl From<GeneralViewMetadata<String>> for TabularMetadata

source§

fn from(value: GeneralViewMetadata<String>) -> TabularMetadata

Converts to this type from the input type.
source§

impl<T> PartialEq for GeneralViewMetadata<T>
where T: PartialEq + Clone + Default,

source§

fn eq(&self, other: &GeneralViewMetadata<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for GeneralViewMetadata<T>
where T: Clone + Default + Serialize,

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

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

impl<T> TryFrom<ViewMetadataEnum<T>> for GeneralViewMetadata<T>
where T: Clone + Default,

§

type Error = Error

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

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

Performs the conversion.
source§

impl<T> TryFrom<ViewMetadataV1<T>> for GeneralViewMetadata<T>
where T: Clone + Default,

§

type Error = Error

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

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

Performs the conversion.
source§

impl<T> Eq for GeneralViewMetadata<T>
where T: Eq + Clone + Default,

source§

impl<T> StructuralPartialEq for GeneralViewMetadata<T>
where T: Clone + Default,

Auto Trait Implementations§

§

impl<T> Freeze for GeneralViewMetadata<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for GeneralViewMetadata<T>
where T: RefUnwindSafe,

§

impl<T> Send for GeneralViewMetadata<T>
where T: Send,

§

impl<T> Sync for GeneralViewMetadata<T>
where T: Sync,

§

impl<T> Unpin for GeneralViewMetadata<T>
where T: Unpin,

§

impl<T> UnwindSafe for GeneralViewMetadata<T>
where T: UnwindSafe,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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,

source§

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