GeneralViewMetadata

Struct GeneralViewMetadata 

Source
pub struct GeneralViewMetadata<T: Materialization> {
    pub view_uuid: Uuid,
    pub format_version: FormatVersion,
    pub location: String,
    pub current_version_id: i64,
    pub versions: HashMap<i64, Version<T>>,
    pub version_log: Vec<VersionLogStruct>,
    pub schemas: HashMap<i32, Schema>,
    pub properties: HashMap<String, String>,
}
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<T>>

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: HashMap<String, String>

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 GeneralViewMetadata<FullIdentifier>

Source

pub fn as_ref(&self) -> TabularMetadataRef<'_>

Source§

impl<T: Materialization> GeneralViewMetadata<T>

Source

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

Gets the current schema for a given branch, or the view’s current schema if no branch is specified

§Arguments
  • branch - Optional branch name to get the schema for
§Returns
  • Result<&Schema, Error> - The current schema, or an error if the schema cannot be found
Source

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

Gets the schema for a specific version ID

§Arguments
  • version_id - The ID of the version to get the schema for
§Returns
  • Result<&Schema, Error> - The schema for the version, or an error if the schema cannot be found
Source

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

Gets the current version for a given reference, or the view’s current version if no reference is specified

§Arguments
  • snapshot_ref - Optional snapshot reference name to get the version for
§Returns
  • Result<&Version<T>, Error> - The current version, or an error if the version cannot be found
Source

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

Adds a new schema to the view metadata

§Arguments
  • schema - The schema to add
Source§

impl GeneralViewMetadata<Option<()>>

Source

pub fn as_ref(&self) -> TabularMetadataRef<'_>

Trait Implementations§

Source§

impl<T: Clone + Materialization> Clone for GeneralViewMetadata<T>

Source§

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

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<T: Debug + Materialization> Debug for GeneralViewMetadata<T>

Source§

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

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

impl<T: Default + Materialization> Default for GeneralViewMetadata<T>

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: Deserialize<'de> + Materialization,

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<'a> From<&'a GeneralViewMetadata<FullIdentifier>> for TabularMetadataRef<'a>

Source§

fn from(value: &'a MaterializedViewMetadata) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(value: &'a ViewMetadata) -> Self

Converts to this type from the input type.
Source§

impl From<GeneralViewMetadata<FullIdentifier>> for TabularMetadata

Source§

fn from(value: MaterializedViewMetadata) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(value: ViewMetadata) -> Self

Converts to this type from the input type.
Source§

impl<T: Materialization> From<GeneralViewMetadata<T>> for ViewMetadataV1<T>

Source§

fn from(value: GeneralViewMetadata<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq + Materialization> PartialEq for GeneralViewMetadata<T>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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>

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
Source§

impl<T: Materialization> TryFrom<ViewMetadataV1<T>> for GeneralViewMetadata<T>

Source§

type Error = Error

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

fn try_from(value: ViewMetadataV1<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: Eq + Materialization> Eq for GeneralViewMetadata<T>

Source§

impl<T: Materialization> StructuralPartialEq for GeneralViewMetadata<T>

Auto Trait Implementations§

§

impl<T> Freeze for GeneralViewMetadata<T>

§

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<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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T