pub struct Reader { /* private fields */ }Expand description
Reads committed native column pages without holding the table in memory.
Implementations§
Source§impl Reader
impl Reader
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Opens the highest valid directory slot.
§Errors
If the file has no valid committed directory or a directory pointer is out of bounds.
Sourcepub fn top_frequencies(
&self,
column: usize,
top: usize,
) -> Result<Option<Vec<(Value, u64)>>>
pub fn top_frequencies( &self, column: usize, top: usize, ) -> Result<Option<Vec<(Value, u64)>>>
Exact leading frequencies when the stored synopsis proves a count-descending prefix.
The returned list can be longer than top. Keeping the stored tail lets a later TopN apply
additional ordering keys without losing a value tied with the requested boundary.
§Errors
If the column is outside the schema or a stored value does not fit its declared type.
Sourcepub fn frequency_occurrences(
&self,
column: usize,
) -> Result<Option<FrequencyOccurrences>>
pub fn frequency_occurrences( &self, column: usize, ) -> Result<Option<FrequencyOccurrences>>
Sparse rows belonging to the bounded numeric frequency candidate set.
The list is omitted when collecting it would exceed the fixed storage budget. A composite
aggregate may accept a result over these rows only when its requested boundary is strictly
greater than omitted_max.
§Errors
If the column is outside the schema.
Sourcepub fn read(&self, stripe: usize, columns: &[usize]) -> Result<Chunk>
pub fn read(&self, stripe: usize, columns: &[usize]) -> Result<Chunk>
Reads only the named columns from one stripe.
§Errors
If a stripe, column, page, or checksum is invalid.
Sourcepub fn read_sparse(&self, stripe: usize, columns: &[usize]) -> Result<Chunk>
pub fn read_sparse(&self, stripe: usize, columns: &[usize]) -> Result<Chunk>
Reads named columns from one stripe without prefetching adjacent stripe pages.
This is intended for sparse row fetches after a selective TopN or filter. Sequential scans
should use Self::read so adjacent pages share one extent read.
§Errors
If a stripe, column, page, or checksum is invalid.
Sourcepub fn skips_codes(
&self,
stripe: usize,
column: usize,
candidates: &[u32],
) -> Result<bool>
pub fn skips_codes( &self, stripe: usize, column: usize, candidates: &[u32], ) -> Result<bool>
Whether an exact global-code membership index proves that a stripe cannot contain any of the sorted candidate codes.
A file written before v8 has no membership index and conservatively keeps the stripe.
§Errors
If the stripe, column, index page, checksum, or delta stream is invalid.