pub enum ParquetType {
PrimitiveType(PrimitiveType),
GroupType {
field_info: FieldInfo,
logical_type: Option<GroupLogicalType>,
converted_type: Option<GroupConvertedType>,
fields: Vec<ParquetType, Global>,
},
}
io_parquet
only.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
field_info: FieldInfo
logical_type: Option<GroupLogicalType>
converted_type: Option<GroupConvertedType>
fields: Vec<ParquetType, Global>
Implementations
impl ParquetType
impl ParquetType
pub fn try_from_thrift(elements: &[SchemaElement]) -> Result<ParquetType, Error>
pub fn try_from_thrift(elements: &[SchemaElement]) -> Result<ParquetType, Error>
Method to convert from Thrift.
impl ParquetType
impl ParquetType
Accessors
pub fn get_field_info(&self) -> &FieldInfo
pub fn get_field_info(&self) -> &FieldInfo
Returns FieldInfo
information about the type.
pub 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.
impl ParquetType
impl ParquetType
Constructors
pub fn from_converted(
name: String,
fields: Vec<ParquetType, Global>,
repetition: Repetition,
converted_type: Option<GroupConvertedType>,
id: Option<i32>
) -> ParquetType
pub fn try_from_primitive(
name: String,
physical_type: PhysicalType,
repetition: Repetition,
converted_type: Option<PrimitiveConvertedType>,
logical_type: Option<PrimitiveLogicalType>,
id: Option<i32>
) -> Result<ParquetType, Error>
pub fn try_from_primitive(
name: String,
physical_type: PhysicalType,
repetition: Repetition,
converted_type: Option<PrimitiveConvertedType>,
logical_type: Option<PrimitiveLogicalType>,
id: Option<i32>
) -> Result<ParquetType, Error>
Error
Errors iff the combination of physical, logical and coverted type is not valid.
pub fn from_physical(name: String, physical_type: PhysicalType) -> ParquetType
pub fn from_physical(name: String, physical_type: PhysicalType) -> ParquetType
Helper method to create a ParquetType::PrimitiveType
optional field
with no logical or converted types.
pub fn from_group(
name: String,
repetition: Repetition,
converted_type: Option<GroupConvertedType>,
logical_type: Option<GroupLogicalType>,
fields: Vec<ParquetType, Global>,
id: Option<i32>
) -> ParquetType
Trait Implementations
impl Clone for ParquetType
impl Clone for ParquetType
fn clone(&self) -> ParquetType
fn clone(&self) -> ParquetType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ParquetType
impl Debug for ParquetType
impl PartialEq<ParquetType> for ParquetType
impl PartialEq<ParquetType> for ParquetType
fn eq(&self, other: &ParquetType) -> bool
fn eq(&self, other: &ParquetType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl StructuralPartialEq for ParquetType
Auto Trait Implementations
impl RefUnwindSafe for ParquetType
impl Send for ParquetType
impl Sync for ParquetType
impl Unpin for ParquetType
impl UnwindSafe for ParquetType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more