Enum parquet::schema::types::Type[][src]

pub enum Type {
    PrimitiveType {
        basic_info: BasicTypeInfo,
        physical_type: PhysicalType,
        type_length: i32,
        scale: i32,
        precision: i32,
    },
    GroupType {
        basic_info: BasicTypeInfo,
        fields: Vec<TypePtr>,
    },
}
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
Show fields

Fields of PrimitiveType

basic_info: BasicTypeInfophysical_type: PhysicalTypetype_length: i32scale: i32precision: i32
GroupType
Show fields

Fields of GroupType

basic_info: BasicTypeInfofields: Vec<TypePtr>

Implementations

impl Type[src]

pub fn primitive_type_builder(
    name: &str,
    physical_type: PhysicalType
) -> PrimitiveTypeBuilder<'_>
[src]

Creates primitive type builder with provided field name and physical type.

pub fn group_type_builder(name: &str) -> GroupTypeBuilder<'_>[src]

Creates group type builder with provided column name.

pub fn get_basic_info(&self) -> &BasicTypeInfo[src]

Returns BasicTypeInfo information about the type.

pub fn name(&self) -> &str[src]

Returns this type’s field name.

pub fn get_fields(&self) -> &[TypePtr][src]

Gets the fields from this group type. Note that this will panic if called on a non-group type.

pub fn get_physical_type(&self) -> PhysicalType[src]

Gets physical type of this primitive type. Note that this will panic if called on a non-primitive type.

pub fn get_precision(&self) -> i32[src]

Gets precision of this primitive type. Note that this will panic if called on a non-primitive type.

pub fn get_scale(&self) -> i32[src]

Gets scale of this primitive type. Note that this will panic if called on a non-primitive type.

pub fn check_contains(&self, sub_type: &Type) -> bool[src]

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.

pub fn is_primitive(&self) -> bool[src]

Returns true if this type is a primitive type, false otherwise.

pub fn is_group(&self) -> bool[src]

Returns true if this type is a group type, false otherwise.

pub fn is_schema(&self) -> bool[src]

Returns true if this type is the top-level schema type (message type).

pub fn is_optional(&self) -> bool[src]

Returns true if this type is repeated or optional. If this type doesn’t have repetition defined, we still treat it as optional.

Trait Implementations

impl Clone for Type[src]

fn clone(&self) -> Type[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Type[src]

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

Formats the value using the given formatter. Read more

impl PartialEq<Type> for Type[src]

fn eq(&self, other: &Type) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Type) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Type[src]

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V