pub struct ParquetMetaData { /* private fields */ }
Expand description
Parsed metadata for a single Parquet file
This structure is stored in the footer of Parquet files, in the format
defined by parquet.thrift
.
§Overview
The fields of this structure are:
FileMetaData
: Information about the overall file (such as the schema) (SeeSelf::file_metadata
)RowGroupMetaData
: Information about each Row Group (seeSelf::row_groups
)ParquetColumnIndex
andParquetOffsetIndex
: Optional “Page Index” structures (seeSelf::column_index
andSelf::offset_index
)
This structure is read by the various readers in this crate or can be read
directly from a file using the ParquetMetaDataReader
struct.
See the ParquetMetaDataBuilder
to create and modify this structure.
Implementations§
Source§impl ParquetMetaData
impl ParquetMetaData
Sourcepub fn new(
file_metadata: FileMetaData,
row_groups: Vec<RowGroupMetaData>,
) -> Self
pub fn new( file_metadata: FileMetaData, row_groups: Vec<RowGroupMetaData>, ) -> Self
Creates Parquet metadata from file metadata and a list of row group metadata
Sourcepub fn new_with_page_index(
file_metadata: FileMetaData,
row_groups: Vec<RowGroupMetaData>,
column_index: Option<ParquetColumnIndex>,
offset_index: Option<ParquetOffsetIndex>,
) -> Self
👎Deprecated: Use ParquetMetaDataBuilder
pub fn new_with_page_index( file_metadata: FileMetaData, row_groups: Vec<RowGroupMetaData>, column_index: Option<ParquetColumnIndex>, offset_index: Option<ParquetOffsetIndex>, ) -> Self
Creates Parquet metadata from file metadata, a list of row group metadata, and the column index structures.
Sourcepub fn into_builder(self) -> ParquetMetaDataBuilder
pub fn into_builder(self) -> ParquetMetaDataBuilder
Convert this ParquetMetaData into a ParquetMetaDataBuilder
Sourcepub fn file_metadata(&self) -> &FileMetaData
pub fn file_metadata(&self) -> &FileMetaData
Returns file metadata as reference.
Sourcepub fn num_row_groups(&self) -> usize
pub fn num_row_groups(&self) -> usize
Returns number of row groups in this file.
Sourcepub fn row_group(&self, i: usize) -> &RowGroupMetaData
pub fn row_group(&self, i: usize) -> &RowGroupMetaData
Returns row group metadata for i
th position.
Position should be less than number of row groups num_row_groups
.
Sourcepub fn row_groups(&self) -> &[RowGroupMetaData]
pub fn row_groups(&self) -> &[RowGroupMetaData]
Returns slice of row groups in this file.
Sourcepub fn page_indexes(&self) -> Option<&ParquetColumnIndex>
👎Deprecated: Use Self::column_index
pub fn page_indexes(&self) -> Option<&ParquetColumnIndex>
Returns page indexes in this file.
Sourcepub fn column_index(&self) -> Option<&ParquetColumnIndex>
pub fn column_index(&self) -> Option<&ParquetColumnIndex>
Returns the column index for this file if loaded
Returns None
if the parquet file does not have a ColumnIndex
or
ArrowReaderOptions::with_page_index was set to false.
Sourcepub fn offset_indexes(&self) -> Option<&ParquetOffsetIndex>
👎Deprecated: Use Self::offset_index
pub fn offset_indexes(&self) -> Option<&ParquetOffsetIndex>
Returns the offset index for this file if loaded
Sourcepub fn offset_index(&self) -> Option<&ParquetOffsetIndex>
pub fn offset_index(&self) -> Option<&ParquetOffsetIndex>
Returns offset indexes in this file, if loaded
Returns None
if the parquet file does not have a OffsetIndex
or
ArrowReaderOptions::with_page_index was set to false.
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
Estimate of the bytes allocated to store ParquetMetadata
§Notes:
-
Includes size of self
-
Includes heap memory for sub fields such as
FileMetaData
andRowGroupMetaData
. -
Includes memory from shared pointers (e.g.
SchemaDescPtr
). This meansmemory_size
will over estimate the memory size if such pointers are shared. -
Does not include any allocator overheads
Trait Implementations§
Source§impl Clone for ParquetMetaData
impl Clone for ParquetMetaData
Source§fn clone(&self) -> ParquetMetaData
fn clone(&self) -> ParquetMetaData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more