pub struct ArrowSheet {
pub name: Arc<str>,
pub columns: Vec<ArrowColumn>,
pub nrows: u32,
pub chunk_starts: Vec<usize>,
pub chunk_rows: usize,
}Fields§
§name: Arc<str>§columns: Vec<ArrowColumn>§nrows: u32§chunk_starts: Vec<usize>§chunk_rows: usizePreferred chunk size (rows) for capacity growth operations.
For Arrow-ingested sheets this matches the ingest chunk_rows. For sparse/overlay-created
sheets this defaults to 32k to avoid creating thousands of tiny chunks during growth.
Implementations§
Source§impl ArrowSheet
impl ArrowSheet
Sourcepub fn shape(&self) -> Vec<ColumnShape>
pub fn shape(&self) -> Vec<ColumnShape>
Return a summary of each column’s chunk counts, total rows, and lane presence.
pub fn range_view( &self, sr: usize, sc: usize, er: usize, ec: usize, ) -> RangeView<'_>
Sourcepub fn get_cell_value(&self, abs_row: usize, abs_col: usize) -> LiteralValue
pub fn get_cell_value(&self, abs_row: usize, abs_col: usize) -> LiteralValue
Fast single-cell read (0-based row/col) with overlay precedence.
This avoids constructing a 1x1 RangeView and is intended for tight read loops.
Sourcepub fn ensure_row_capacity(&mut self, target_rows: usize)
pub fn ensure_row_capacity(&mut self, target_rows: usize)
Ensure capacity to address at least target_rows rows by extending the row chunk map.
This updates chunk_starts/nrows but does not eagerly densify all columns with
new empty chunks. Missing chunks are treated as all-empty and can be materialized lazily.
Sourcepub fn ensure_column_chunk_mut(
&mut self,
col_idx: usize,
ch_idx: usize,
) -> Option<&mut ColumnChunk>
pub fn ensure_column_chunk_mut( &mut self, col_idx: usize, ch_idx: usize, ) -> Option<&mut ColumnChunk>
Ensure a mutable chunk for a given column/chunk index.
If the chunk is beyond the column’s dense chunk vector, it is stored in sparse_chunks.
Sourcepub fn chunk_of_row(&self, abs_row: usize) -> Option<(usize, usize)>
pub fn chunk_of_row(&self, abs_row: usize) -> Option<(usize, usize)>
Return (chunk_idx, in_chunk_offset) for absolute 0-based row.
Sourcepub fn maybe_compact_chunk(
&mut self,
col_idx: usize,
ch_idx: usize,
abs_threshold: usize,
frac_den: usize,
) -> usize
pub fn maybe_compact_chunk( &mut self, col_idx: usize, ch_idx: usize, abs_threshold: usize, frac_den: usize, ) -> usize
Heuristic compaction: rebuilds a chunk’s base arrays by applying its overlay when overlay density crosses thresholds. Returns true if a rebuild occurred.
Sourcepub fn compact_computed_overlay_chunk(
&mut self,
col_idx: usize,
ch_idx: usize,
) -> usize
pub fn compact_computed_overlay_chunk( &mut self, col_idx: usize, ch_idx: usize, ) -> usize
Compact a dense chunk’s computed overlay into its base arrays, freeing overlay memory while preserving the data. Returns the number of bytes freed.
This is the computed-overlay counterpart of maybe_compact_chunk (which compacts
user-edit overlays). The read cascade is overlay → computed_overlay → base, so
folding computed overlay entries into base arrays is transparent: the overlay layer
(user edits) is left untouched and still takes precedence on reads.
Sourcepub fn compact_computed_overlay_sparse_chunk(
&mut self,
col_idx: usize,
ch_idx: usize,
) -> usize
pub fn compact_computed_overlay_sparse_chunk( &mut self, col_idx: usize, ch_idx: usize, ) -> usize
Compact a sparse chunk’s computed overlay into its base arrays.
Equivalent to compact_computed_overlay_chunk but for sparse chunks.
Sourcepub fn insert_rows(&mut self, before: usize, count: usize)
pub fn insert_rows(&mut self, before: usize, count: usize)
Insert count rows before absolute 0-based row before.
Sourcepub fn delete_rows(&mut self, start: usize, count: usize)
pub fn delete_rows(&mut self, start: usize, count: usize)
Delete count rows starting from absolute 0-based row start.
Sourcepub fn insert_columns(&mut self, before: usize, count: usize)
pub fn insert_columns(&mut self, before: usize, count: usize)
Insert count columns before absolute 0-based column before with empty chunks.
Sourcepub fn delete_columns(&mut self, start: usize, count: usize)
pub fn delete_columns(&mut self, start: usize, count: usize)
Delete count columns starting at absolute 0-based column start.
Trait Implementations§
Source§impl Clone for ArrowSheet
impl Clone for ArrowSheet
Source§fn clone(&self) -> ArrowSheet
fn clone(&self) -> ArrowSheet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ArrowSheet
impl !RefUnwindSafe for ArrowSheet
impl Send for ArrowSheet
impl Sync for ArrowSheet
impl Unpin for ArrowSheet
impl UnsafeUnpin for ArrowSheet
impl !UnwindSafe for ArrowSheet
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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