pub struct FileMetadata {
pub version: i32,
pub num_rows: usize,
pub max_row_group_height: usize,
pub created_by: Option<String>,
pub row_groups: Vec<RowGroupMetadata>,
pub key_value_metadata: Option<Vec<KeyValue>>,
pub schema_descr: SchemaDescriptor,
pub column_orders: Option<Vec<ColumnOrder>>,
}
Expand description
Metadata for a Parquet file.
Fields§
§version: i32
version of this file.
num_rows: usize
number of rows in the file.
max_row_group_height: usize
Max row group height, useful for sharing column materializations.
created_by: Option<String>
String message for application that wrote this file.
This should have the following format:
<application> version <application version> (build <application build hash>)
.
parquet-mr version 1.8.0 (build 0fda28af84b9746396014ad6a415b90592a98b3b)
row_groups: Vec<RowGroupMetadata>
The row groups of this file
key_value_metadata: Option<Vec<KeyValue>>
key_value_metadata of this file.
schema_descr: SchemaDescriptor
schema descriptor.
column_orders: Option<Vec<ColumnOrder>>
Column (sort) order used for min
and max
values of each column in this file.
Each column order corresponds to one column, determined by its position in the list, matching the position of the column in the schema.
When None
is returned, there are no column orders available, and each column
should be assumed to have undefined (legacy) column order.
Implementations§
Source§impl FileMetadata
impl FileMetadata
Sourcepub fn schema(&self) -> &SchemaDescriptor
pub fn schema(&self) -> &SchemaDescriptor
Returns the SchemaDescriptor
that describes schema of this file.
Sourcepub fn key_value_metadata(&self) -> &Option<Vec<KeyValue>>
pub fn key_value_metadata(&self) -> &Option<Vec<KeyValue>>
returns the metadata
Sourcepub fn column_order(&self, i: usize) -> ColumnOrder
pub fn column_order(&self, i: usize) -> ColumnOrder
Returns column order for i
th column in this file.
If column orders are not available, returns undefined (legacy) column order.
Sourcepub fn try_from_thrift(metadata: FileMetaData) -> Result<Self, ParquetError>
pub fn try_from_thrift(metadata: FileMetaData) -> Result<Self, ParquetError>
Deserializes [crate::parquet::thrift_format::FileMetadata
] into this struct
Trait Implementations§
Source§impl Clone for FileMetadata
impl Clone for FileMetadata
Source§fn clone(&self) -> FileMetadata
fn clone(&self) -> FileMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for FileMetadata
impl RefUnwindSafe for FileMetadata
impl Send for FileMetadata
impl Sync for FileMetadata
impl Unpin for FileMetadata
impl UnwindSafe for FileMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more