pub(crate) struct SchemaElement<'a> {
pub(crate) type: Option<Type>,
pub(crate) type_length: Option<i32>,
pub(crate) repetition_type: Option<Repetition>,
pub(crate) name: &'a str,
pub(crate) num_children: Option<i32>,
pub(crate) converted_type: Option<ConvertedType>,
pub(crate) scale: Option<i32>,
pub(crate) precision: Option<i32>,
pub(crate) field_id: Option<i32>,
pub(crate) logical_type: Option<LogicalType>,
}
Fields§
§type: Option<Type>
Data type for this field. Not set if the current element is a non-leaf node
type_length: Option<i32>
If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
repetition_type: Option<Repetition>
Repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one.
name: &'a str
Name of the field in the schema
num_children: Option<i32>
Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type.
converted_type: Option<ConvertedType>
DEPRECATED: When the schema is the result of a conversion from another model. Used to record the original type to help with cross conversion.
This is superseded by logical_type.
scale: Option<i32>
DEPRECATED: Used when this column contains decimal data. See the DECIMAL converted type for more details.
This is superseded by using the DecimalType annotation in logical_type.
precision: Option<i32>
§field_id: Option<i32>
When the original schema supports field ids, this will save the original field id in the parquet schema
logical_type: Option<LogicalType>
The logical type of this SchemaElement
LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
Trait Implementations§
Source§impl<'a> Clone for SchemaElement<'a>
impl<'a> Clone for SchemaElement<'a>
Source§fn clone(&self) -> SchemaElement<'a>
fn clone(&self) -> SchemaElement<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for SchemaElement<'a>
impl<'a> Debug for SchemaElement<'a>
Source§impl<'a> PartialEq for SchemaElement<'a>
impl<'a> PartialEq for SchemaElement<'a>
Source§impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for SchemaElement<'a>
impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for SchemaElement<'a>
Source§fn read_thrift(prot: &mut R) -> Result<Self>
fn read_thrift(prot: &mut R) -> Result<Self>
Self
from the input protocol object.Source§impl<'a> WriteThrift for SchemaElement<'a>
impl<'a> WriteThrift for SchemaElement<'a>
Source§const ELEMENT_TYPE: ElementType = ElementType::Struct
const ELEMENT_TYPE: ElementType = ElementType::Struct
ElementType
to use when a list of this object is written.Source§fn write_thrift<W: Write>(
&self,
writer: &mut ThriftCompactOutputProtocol<W>,
) -> Result<()>
fn write_thrift<W: Write>( &self, writer: &mut ThriftCompactOutputProtocol<W>, ) -> Result<()>
writer
.Source§impl<'a> WriteThriftField for SchemaElement<'a>
impl<'a> WriteThriftField for SchemaElement<'a>
Source§fn write_thrift_field<W: Write>(
&self,
writer: &mut ThriftCompactOutputProtocol<W>,
field_id: i16,
last_field_id: i16,
) -> Result<i16>
fn write_thrift_field<W: Write>( &self, writer: &mut ThriftCompactOutputProtocol<W>, field_id: i16, last_field_id: i16, ) -> Result<i16>
field_id
, using last_field_id
to compute the
field delta used by the Thrift compact protocol. On success this will return field_id
to be used in chaining.impl<'a> Eq for SchemaElement<'a>
impl<'a> StructuralPartialEq for SchemaElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaElement<'a>
impl<'a> RefUnwindSafe for SchemaElement<'a>
impl<'a> Send for SchemaElement<'a>
impl<'a> Sync for SchemaElement<'a>
impl<'a> Unpin for SchemaElement<'a>
impl<'a> UnwindSafe for SchemaElement<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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