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
sourceimpl CompressedDataPage
impl CompressedDataPage
sourcepub fn new(
header: DataPageHeader,
buffer: Vec<u8>,
compression: Compression,
uncompressed_page_size: usize,
dictionary_page: Option<Arc<dyn DictPage>>,
descriptor: Descriptor,
rows: Option<usize>
) -> Self
pub fn new(
header: DataPageHeader,
buffer: Vec<u8>,
compression: Compression,
uncompressed_page_size: usize,
dictionary_page: Option<Arc<dyn DictPage>>,
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
Trait Implementations
sourceimpl Compressed for CompressedDataPage
impl Compressed for CompressedDataPage
fn is_compressed(&self) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for CompressedDataPage
impl Send for CompressedDataPage
impl Sync for CompressedDataPage
impl Unpin for CompressedDataPage
impl !UnwindSafe for CompressedDataPage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more