pub struct CompressedDataPage {
pub num_rows: Option<usize>,
/* 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.
Fields§
§num_rows: Option<usize>
Implementations§
Source§impl CompressedDataPage
impl CompressedDataPage
Sourcepub fn new(
header: DataPageHeader,
buffer: CowBuffer,
compression: Compression,
uncompressed_page_size: usize,
descriptor: Descriptor,
num_rows: usize,
) -> Self
pub fn new( header: DataPageHeader, buffer: CowBuffer, compression: Compression, uncompressed_page_size: usize, descriptor: Descriptor, num_rows: 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.
pub fn num_values(&self) -> usize
pub fn num_rows(&self) -> Option<usize>
Sourcepub fn statistics(&self) -> Option<ParquetResult<Statistics>>
pub fn statistics(&self) -> Option<ParquetResult<Statistics>>
Decodes the raw statistics into a statistics
pub fn slice_mut(&mut self) -> &mut CowBuffer
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CompressedDataPage
impl RefUnwindSafe for CompressedDataPage
impl Send for CompressedDataPage
impl Sync for CompressedDataPage
impl Unpin for CompressedDataPage
impl UnwindSafe for CompressedDataPage
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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