pub struct ParxReader { /* private fields */ }Expand description
Reader for PARX sidecar files.
Parses and validates PARX files, providing access to the cached Parquet footer bytes and optional page index data.
Implementations§
Source§impl ParxReader
impl ParxReader
Sourcepub fn open_bytes(bytes: &Bytes) -> Result<Self>
pub fn open_bytes(bytes: &Bytes) -> Result<Self>
Open a PARX file from owned Bytes (zero-copy where possible).
Use this when you already have Bytes (e.g., from object_store) to potentially reduce allocations.
§Errors
Returns error if file is invalid or corrupted.
Sourcepub const fn manifest(&self) -> &ParxManifest
pub const fn manifest(&self) -> &ParxManifest
Get the parsed manifest.
Get the cached Parquet footer bytes (decompressed if necessary).
Sourcepub const fn is_compressed(&self) -> bool
pub const fn is_compressed(&self) -> bool
Check if the footer was stored compressed.
Sourcepub const fn compression_algorithm(&self) -> Option<Compression>
pub const fn compression_algorithm(&self) -> Option<Compression>
Get the compression algorithm used, if any.
Get the original uncompressed footer size.
Returns 0 if footer was not compressed.
Sourcepub const fn has_page_indexes(&self) -> bool
pub const fn has_page_indexes(&self) -> bool
Check if this PARX file contains page index data.
Sourcepub fn page_index_bytes(&self) -> Option<&[u8]>
pub fn page_index_bytes(&self) -> Option<&[u8]>
Get raw page index payload bytes, if present (decompressed).
Page indexes include concatenated ColumnIndex and OffsetIndex structures from Parquet V2 format.
Sourcepub const fn uncompressed_page_index_size(&self) -> u64
pub const fn uncompressed_page_index_size(&self) -> u64
Get the original uncompressed page index size.
Returns 0 if page indexes were not compressed.
Sourcepub const fn validate_source_size(&self, source_size: u64) -> bool
pub const fn validate_source_size(&self, source_size: u64) -> bool
Validate that this PARX file matches the given Parquet file size.
This is the fast validation check that should always be performed before using cached footer bytes.
Validate that this PARX file matches the given Parquet footer hash.
This is the paranoid validation check that re-hashes the original Parquet footer bytes. Only use when you have the original footer.
Sourcepub fn source_uri(&self) -> &str
pub fn source_uri(&self) -> &str
Get the source URI from the manifest (may be empty).
Sourcepub const fn source_size(&self) -> u64
pub const fn source_size(&self) -> u64
Get the source file size from the manifest.
Sourcepub const fn created_at_ms(&self) -> u64
pub const fn created_at_ms(&self) -> u64
Get the creation timestamp in milliseconds.
Trait Implementations§
Source§impl Clone for ParxReader
impl Clone for ParxReader
Source§fn clone(&self) -> ParxReader
fn clone(&self) -> ParxReader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more