Enum arrow2::io::parquet::write::ParquetType

source ·
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

§field_info: FieldInfo
§logical_type: Option<GroupLogicalType>
§converted_type: Option<GroupConvertedType>

Implementations§

source§

impl ParquetType

source

pub fn try_from_thrift(elements: &[SchemaElement]) -> Result<ParquetType, Error>

Method to convert from Thrift.

source§

impl ParquetType

Accessors

source

pub fn get_field_info(&self) -> &FieldInfo

Returns FieldInfo information about the type.

source

pub fn name(&self) -> &str

Returns this type’s field name.

source

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

Constructors

source

pub fn from_converted( name: String, fields: Vec<ParquetType>, repetition: Repetition, converted_type: Option<GroupConvertedType>, id: Option<i32> ) -> ParquetType

source

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.

source

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.

source

pub fn from_group( name: String, repetition: Repetition, converted_type: Option<GroupConvertedType>, logical_type: Option<GroupLogicalType>, fields: Vec<ParquetType>, id: Option<i32> ) -> ParquetType

Trait Implementations§

source§

impl Clone for ParquetType

source§

fn clone(&self) -> ParquetType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ParquetType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for ParquetType

source§

fn eq(&self, other: &ParquetType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ParquetType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.