Struct parquet2::page::CompressedDataPage
source · pub struct CompressedDataPage { /* private fields */ }
Expand description
A CompressedDataPage
is compressed, encoded representation of a Parquet data page.
It holds actual data and thus cloning it is expensive.
Implementations§
source§impl CompressedDataPage
impl CompressedDataPage
sourcepub fn new(
header: DataPageHeader,
buffer: Vec<u8>,
compression: Compression,
uncompressed_page_size: usize,
descriptor: Descriptor,
rows: Option<usize>
) -> Self
pub fn new( header: DataPageHeader, buffer: Vec<u8>, compression: Compression, uncompressed_page_size: usize, descriptor: Descriptor, rows: Option<usize> ) -> Self
Returns a new CompressedDataPage
.
pub fn header(&self) -> &DataPageHeader
pub fn uncompressed_size(&self) -> usize
pub fn compressed_size(&self) -> usize
sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
The compression of the data in this page.
Note that what is compressed in a page depends on its version:
in V1, the whole data ([repetition levels][definition levels][values]
) is compressed; in V2 only the values are compressed.
sourcepub fn selected_rows(&self) -> Option<&[Interval]>
pub fn selected_rows(&self) -> Option<&[Interval]>
the rows to be selected by this page.
When None
, all rows are to be considered.
pub fn num_values(&self) -> usize
sourcepub fn statistics(&self) -> Option<Result<Arc<dyn Statistics>>>
pub fn statistics(&self) -> Option<Result<Arc<dyn Statistics>>>
Decodes the raw statistics into a statistics