pub struct ColumnChunkMetadata { /* private fields */ }
Expand description
Metadata for a column chunk.
This contains the ColumnDescriptor
associated with the chunk so that deserializers have
access to the descriptor (e.g. physical, converted, logical).
This struct is intentionally not Clone
, as it is a huge struct.
Implementations§
Source§impl ColumnChunkMetadata
impl ColumnChunkMetadata
Sourcepub fn new(column_chunk: ColumnChunk, column_descr: ColumnDescriptor) -> Self
pub fn new(column_chunk: ColumnChunk, column_descr: ColumnDescriptor) -> Self
Returns a new ColumnChunkMetadata
Sourcepub fn file_path(&self) -> &Option<String>
pub fn file_path(&self) -> &Option<String>
File where the column chunk is stored.
If not set, assumed to belong to the same file as the metadata. This path is relative to the current file.
Sourcepub fn file_offset(&self) -> i64
pub fn file_offset(&self) -> i64
Byte offset in file_path()
.
Sourcepub fn column_chunk(&self) -> &ColumnChunk
pub fn column_chunk(&self) -> &ColumnChunk
Returns this column’s ColumnChunk
Sourcepub fn metadata(&self) -> &ColumnMetaData
pub fn metadata(&self) -> &ColumnMetaData
The column’s ColumnMetaData
Sourcepub fn descriptor(&self) -> &ColumnDescriptor
pub fn descriptor(&self) -> &ColumnDescriptor
The ColumnDescriptor
for this column. This descriptor contains the physical and logical type
of the pages.
Sourcepub fn physical_type(&self) -> PhysicalType
pub fn physical_type(&self) -> PhysicalType
The PhysicalType
of this column.
Sourcepub fn statistics(&self) -> Option<ParquetResult<Statistics>>
pub fn statistics(&self) -> Option<ParquetResult<Statistics>>
Decodes the raw statistics into Statistics
.
Sourcepub fn num_values(&self) -> i64
pub fn num_values(&self) -> i64
Total number of values in this column chunk. Note that this is not necessarily the number
of rows. E.g. the (nested) array [[1, 2], [3]]
has 2 rows and 3 values.
Sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
Compression
for this column.
Sourcepub fn compressed_size(&self) -> i64
pub fn compressed_size(&self) -> i64
Returns the total compressed data size of this column chunk.
Sourcepub fn uncompressed_size(&self) -> i64
pub fn uncompressed_size(&self) -> i64
Returns the total uncompressed data size of this column chunk.
Sourcepub fn data_page_offset(&self) -> i64
pub fn data_page_offset(&self) -> i64
Returns the offset for the column data.
Sourcepub fn has_index_page(&self) -> bool
pub fn has_index_page(&self) -> bool
Returns true
if this column chunk contains a index page, false
otherwise.
Sourcepub fn index_page_offset(&self) -> Option<i64>
pub fn index_page_offset(&self) -> Option<i64>
Returns the offset for the index page.
Sourcepub fn dictionary_page_offset(&self) -> Option<i64>
pub fn dictionary_page_offset(&self) -> Option<i64>
Returns the offset for the dictionary page, if any.
Sourcepub fn column_encoding(&self) -> &Vec<Encoding>
pub fn column_encoding(&self) -> &Vec<Encoding>
Returns the encoding for this column
Sourcepub fn byte_range(&self) -> Range<u64>
pub fn byte_range(&self) -> Range<u64>
Returns the offset and length in bytes of the column chunk within the file
Sourcepub fn into_thrift(self) -> ColumnChunk
pub fn into_thrift(self) -> ColumnChunk
Method to convert to Thrift.
Trait Implementations§
Source§impl Debug for ColumnChunkMetadata
impl Debug for ColumnChunkMetadata
Source§impl From<&ColumnChunkMetadata> for PageMetaData
impl From<&ColumnChunkMetadata> for PageMetaData
Source§fn from(column: &ColumnChunkMetadata) -> Self
fn from(column: &ColumnChunkMetadata) -> Self
Auto Trait Implementations§
impl Freeze for ColumnChunkMetadata
impl RefUnwindSafe for ColumnChunkMetadata
impl Send for ColumnChunkMetadata
impl Sync for ColumnChunkMetadata
impl Unpin for ColumnChunkMetadata
impl UnwindSafe for ColumnChunkMetadata
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> 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