parquet::schema::types

Struct SchemaDescriptor

Source
pub struct SchemaDescriptor { /* private fields */ }
Expand description

A schema descriptor. This encapsulates the top-level schemas for all the columns, as well as all descriptors for all the primitive columns.

Implementations§

Source§

impl SchemaDescriptor

Source

pub fn new(tp: TypePtr) -> Self

Creates new schema descriptor from Parquet schema.

Source

pub fn column(&self, i: usize) -> ColumnDescPtr

Returns ColumnDescriptor for a field position.

Source

pub fn columns(&self) -> &[ColumnDescPtr]

Returns slice of ColumnDescriptor.

Source

pub fn num_columns(&self) -> usize

Returns number of leaf-level columns.

Source

pub fn get_column_root(&self, i: usize) -> &Type

Returns column root Type for a leaf position.

Source

pub fn get_column_root_ptr(&self, i: usize) -> TypePtr

Returns column root Type pointer for a leaf position.

Source

pub fn get_column_root_idx(&self, leaf: usize) -> usize

Returns the index of the root column for a field position

Source

pub fn root_schema(&self) -> &Type

Returns schema as Type.

Source

pub fn root_schema_ptr(&self) -> TypePtr

Source

pub fn name(&self) -> &str

Returns schema name.

Trait Implementations§

Source§

impl Debug for SchemaDescriptor

Source§

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

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

impl PartialEq for SchemaDescriptor

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SchemaDescriptor

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,