pub enum ParquetType {
PrimitiveType {
basic_info: BasicTypeInfo,
logical_type: Option<LogicalType>,
converted_type: Option<PrimitiveConvertedType>,
physical_type: PhysicalType,
},
GroupType {
basic_info: BasicTypeInfo,
logical_type: Option<LogicalType>,
converted_type: Option<GroupConvertedType>,
fields: Vec<ParquetType>,
},
}
Expand description
Representation of a Parquet type.
Used to describe primitive leaf fields and structs, including top-level schema.
Note that the top-level schema type is represented using GroupType
whose
repetition is None
.
Variants
PrimitiveType
Fields
basic_info: BasicTypeInfo
logical_type: Option<LogicalType>
converted_type: Option<PrimitiveConvertedType>
physical_type: PhysicalType
GroupType
Fields
basic_info: BasicTypeInfo
logical_type: Option<LogicalType>
converted_type: Option<GroupConvertedType>
fields: Vec<ParquetType>
Implementations
sourceimpl ParquetType
impl ParquetType
sourcepub fn try_from_thrift(elements: &[&SchemaElement]) -> Result<ParquetType>
pub fn try_from_thrift(elements: &[&SchemaElement]) -> Result<ParquetType>
Method to convert from Thrift.
sourceimpl ParquetType
impl ParquetType
sourcepub fn to_thrift(&self) -> Result<Vec<SchemaElement>>
pub fn to_thrift(&self) -> Result<Vec<SchemaElement>>
Method to convert to Thrift.
sourceimpl ParquetType
impl ParquetType
Accessors
sourcepub fn get_basic_info(&self) -> &BasicTypeInfo
pub fn get_basic_info(&self) -> &BasicTypeInfo
Returns BasicTypeInfo
information about the type.
pub fn is_root(&self) -> bool
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.
sourceimpl ParquetType
impl ParquetType
Constructors
pub fn new_root(name: String, fields: Vec<ParquetType>) -> Self
pub fn from_converted(
name: String,
fields: Vec<ParquetType>,
repetition: Option<Repetition>,
converted_type: Option<GroupConvertedType>,
id: Option<i32>
) -> Self
pub fn try_from_primitive(
name: String,
physical_type: PhysicalType,
repetition: Repetition,
converted_type: Option<PrimitiveConvertedType>,
logical_type: Option<LogicalType>,
id: Option<i32>
) -> Result<Self>
pub fn from_physical(name: String, physical_type: PhysicalType) -> Self
pub fn try_from_group(
name: String,
repetition: Repetition,
converted_type: Option<GroupConvertedType>,
logical_type: Option<LogicalType>,
fields: Vec<ParquetType>,
id: Option<i32>
) -> Result<Self>
Trait Implementations
sourceimpl Clone for ParquetType
impl Clone for ParquetType
sourcefn 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
sourceimpl Debug for ParquetType
impl Debug for ParquetType
sourceimpl PartialEq<ParquetType> for ParquetType
impl PartialEq<ParquetType> for ParquetType
sourcefn 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
sourcefn ne(&self, other: &ParquetType) -> bool
fn ne(&self, other: &ParquetType) -> bool
This method tests for !=
.
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more