pub struct Schema { /* private fields */ }
Expand description
Defines schema in iceberg.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn builder() -> SchemaBuilder
pub fn builder() -> SchemaBuilder
Create a schema builder.
Sourcepub fn into_builder(self) -> SchemaBuilder
pub fn into_builder(self) -> SchemaBuilder
Create a new schema builder from a schema.
Sourcepub fn field_by_id(&self, field_id: i32) -> Option<&NestedFieldRef>
pub fn field_by_id(&self, field_id: i32) -> Option<&NestedFieldRef>
Get field by field id.
Sourcepub fn field_by_name(&self, field_name: &str) -> Option<&NestedFieldRef>
pub fn field_by_name(&self, field_name: &str) -> Option<&NestedFieldRef>
Get field by field name.
Both full name and short name could work here.
Sourcepub fn field_by_name_case_insensitive(
&self,
field_name: &str,
) -> Option<&NestedFieldRef>
pub fn field_by_name_case_insensitive( &self, field_name: &str, ) -> Option<&NestedFieldRef>
Get field by field name, but in case-insensitive way.
Both full name and short name could work here.
Sourcepub fn field_by_alias(&self, alias: &str) -> Option<&NestedFieldRef>
pub fn field_by_alias(&self, alias: &str) -> Option<&NestedFieldRef>
Get field by alias.
Sourcepub fn highest_field_id(&self) -> i32
pub fn highest_field_id(&self) -> i32
Returns [highest_field_id
].
Sourcepub fn as_struct(&self) -> &StructType
pub fn as_struct(&self) -> &StructType
Returns [r#struct
].
Sourcepub fn identifier_field_ids(&self) -> impl ExactSizeIterator<Item = i32> + '_
pub fn identifier_field_ids(&self) -> impl ExactSizeIterator<Item = i32> + '_
Returns [identifier_field_ids
].
Sourcepub fn field_id_by_name(&self, name: &str) -> Option<i32>
pub fn field_id_by_name(&self, name: &str) -> Option<i32>
Get field id by full name.
Sourcepub fn name_by_field_id(&self, field_id: i32) -> Option<&str>
pub fn name_by_field_id(&self, field_id: i32) -> Option<&str>
Get full name by field id.
Sourcepub fn accessor_by_field_id(&self, field_id: i32) -> Option<Arc<StructAccessor>>
pub fn accessor_by_field_id(&self, field_id: i32) -> Option<Arc<StructAccessor>>
Get an accessor for retrieving data in a struct
Sourcepub fn field_id_to_name_map(&self) -> &HashMap<i32, String>
pub fn field_id_to_name_map(&self) -> &HashMap<i32, String>
Return A HashMap matching field ids to field names.
Sourcepub fn field_id_to_fields(&self) -> &HashMap<i32, NestedFieldRef>
pub fn field_id_to_fields(&self) -> &HashMap<i32, NestedFieldRef>
Return a hashmap matching field ids to nested fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Schema
Auto Trait Implementations§
impl !Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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 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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.