pub enum ParquetType {
PrimitiveType(PrimitiveType),
GroupType {
field_info: FieldInfo,
logical_type: Option<GroupLogicalType>,
converted_type: Option<GroupConvertedType>,
fields: Vec<ParquetType>,
},
}
Expand description
Representation of a Parquet type describing primitive and nested fields, including the top-level schema of the parquet file.
Variants§
PrimitiveType(PrimitiveType)
GroupType
Fields
§
logical_type: Option<GroupLogicalType>
§
converted_type: Option<GroupConvertedType>
§
fields: Vec<ParquetType>
Implementations§
Source§impl ParquetType
impl ParquetType
Sourcepub fn try_from_thrift(elements: &[SchemaElement]) -> ParquetResult<ParquetType>
pub fn try_from_thrift(elements: &[SchemaElement]) -> ParquetResult<ParquetType>
Method to convert from Thrift.
Source§impl ParquetType
impl ParquetType
Accessors
Sourcepub fn get_field_info(&self) -> &FieldInfo
pub fn get_field_info(&self) -> &FieldInfo
Returns FieldInfo
information about the type.
Sourcepub fn check_contains(&self, sub_type: &ParquetType) -> bool
pub fn check_contains(&self, sub_type: &ParquetType) -> bool
Checks if sub_type
schema is part of current schema.
This method can be used to check if projected columns are part of the root schema.
Source§impl ParquetType
impl ParquetType
Constructors
pub fn from_converted( name: PlSmallStr, fields: Vec<ParquetType>, repetition: Repetition, converted_type: Option<GroupConvertedType>, id: Option<i32>, ) -> Self
Sourcepub fn try_from_primitive(
name: PlSmallStr,
physical_type: PhysicalType,
repetition: Repetition,
converted_type: Option<PrimitiveConvertedType>,
logical_type: Option<PrimitiveLogicalType>,
id: Option<i32>,
) -> ParquetResult<Self>
pub fn try_from_primitive( name: PlSmallStr, physical_type: PhysicalType, repetition: Repetition, converted_type: Option<PrimitiveConvertedType>, logical_type: Option<PrimitiveLogicalType>, id: Option<i32>, ) -> ParquetResult<Self>
§Error
Errors iff the combination of physical, logical and converted type is not valid.
Sourcepub fn from_physical(name: PlSmallStr, physical_type: PhysicalType) -> Self
pub fn from_physical(name: PlSmallStr, physical_type: PhysicalType) -> Self
Helper method to create a ParquetType::PrimitiveType
optional field
with no logical or converted types.
pub fn from_group( name: PlSmallStr, repetition: Repetition, converted_type: Option<GroupConvertedType>, logical_type: Option<GroupLogicalType>, fields: Vec<ParquetType>, id: Option<i32>, ) -> Self
Trait Implementations§
Source§impl Clone for ParquetType
impl Clone for ParquetType
Source§fn clone(&self) -> ParquetType
fn clone(&self) -> ParquetType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParquetType
impl Debug for ParquetType
Source§impl PartialEq for ParquetType
impl PartialEq for ParquetType
impl StructuralPartialEq for ParquetType
Auto Trait Implementations§
impl Freeze for ParquetType
impl RefUnwindSafe for ParquetType
impl Send for ParquetType
impl Sync for ParquetType
impl Unpin for ParquetType
impl UnwindSafe for ParquetType
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more