polars_parquet::parquet::metadata

Struct ColumnChunkMetadata

Source
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

Source

pub fn new(column_chunk: ColumnChunk, column_descr: ColumnDescriptor) -> Self

Returns a new ColumnChunkMetadata

Source

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.

Source

pub fn file_offset(&self) -> i64

Byte offset in file_path().

Source

pub fn column_chunk(&self) -> &ColumnChunk

Returns this column’s ColumnChunk

Source

pub fn metadata(&self) -> &ColumnMetaData

The column’s ColumnMetaData

Source

pub fn descriptor(&self) -> &ColumnDescriptor

The ColumnDescriptor for this column. This descriptor contains the physical and logical type of the pages.

Source

pub fn physical_type(&self) -> PhysicalType

The PhysicalType of this column.

Source

pub fn statistics(&self) -> Option<ParquetResult<Statistics>>

Decodes the raw statistics into Statistics.

Source

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.

Source

pub fn compression(&self) -> Compression

Compression for this column.

Source

pub fn compressed_size(&self) -> i64

Returns the total compressed data size of this column chunk.

Source

pub fn uncompressed_size(&self) -> i64

Returns the total uncompressed data size of this column chunk.

Source

pub fn data_page_offset(&self) -> i64

Returns the offset for the column data.

Source

pub fn has_index_page(&self) -> bool

Returns true if this column chunk contains a index page, false otherwise.

Source

pub fn index_page_offset(&self) -> Option<i64>

Returns the offset for the index page.

Source

pub fn dictionary_page_offset(&self) -> Option<i64>

Returns the offset for the dictionary page, if any.

Source

pub fn column_encoding(&self) -> &Vec<Encoding>

Returns the encoding for this column

Source

pub fn byte_range(&self) -> Range<u64>

Returns the offset and length in bytes of the column chunk within the file

Source

pub fn into_thrift(self) -> ColumnChunk

Method to convert to Thrift.

Trait Implementations§

Source§

impl Debug for ColumnChunkMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&ColumnChunkMetadata> for PageMetaData

Source§

fn from(column: &ColumnChunkMetadata) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.