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

pub enum Type {
    PrimitiveType {
        basic_info: BasicTypeInfo,
        physical_type: PhysicalType,
        type_length: i32,
        scale: i32,
        precision: i32,
    },
    GroupType {
        basic_info: BasicTypeInfo,
        fields: Vec<TypePtr>,
    },
}

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 of PrimitiveType

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

Fields of GroupType

basic_info: BasicTypeInfofields: Vec<TypePtr>

Methods

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 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]

impl PartialEq<Type> for Type[src]

impl Debug for Type[src]

impl StructuralPartialEq for Type[src]

Auto Trait Implementations

impl !Send for Type

impl !Sync for Type

impl Unpin for Type

impl !UnwindSafe for Type

impl !RefUnwindSafe for Type

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

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

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

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

impl<T> FromCast<T> for T

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

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

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