pub struct SchemaDescriptor { /* private fields */ }
Available on crate feature
io_parquet
only.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
impl SchemaDescriptor
sourcepub fn new(name: String, fields: Vec<ParquetType, Global>) -> SchemaDescriptor
pub fn new(name: String, fields: Vec<ParquetType, Global>) -> SchemaDescriptor
Creates new schema descriptor from Parquet schema.
sourcepub fn columns(&self) -> &[ColumnDescriptor]
pub fn columns(&self) -> &[ColumnDescriptor]
The ColumnDescriptor
(leafs) of this schema.
Note that, for nested fields, this may contain more entries than the number of fields in the file - e.g. a struct field may have two columns.
sourcepub fn fields(&self) -> &[ParquetType]
pub fn fields(&self) -> &[ParquetType]
The schemas’ fields.
sourcepub fn try_from_message(message: &str) -> Result<SchemaDescriptor, Error>
pub fn try_from_message(message: &str) -> Result<SchemaDescriptor, Error>
Creates a schema from
Trait Implementations§
source§impl Clone for SchemaDescriptor
impl Clone for SchemaDescriptor
source§fn clone(&self) -> SchemaDescriptor
fn clone(&self) -> SchemaDescriptor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more