pub enum ColChunk<U: ColumnarUpdate> {
Resident(Rc<UpdatesTyped<U>>),
Paged(Rc<PagedChunk<U>>),
}Expand description
A sorted, consolidated columnar trie of ((key, val), time, diff): resident, or
paged to backing storage.
Variants§
Resident(Rc<UpdatesTyped<U>>)
The trie in memory, shared via Rc.
Paged(Rc<PagedChunk<U>>)
Spilled out: resident bounds + a fetch handle (and a fill-once cache).
Implementations§
Source§impl<U: ColumnarUpdate> ColChunk<U>
impl<U: ColumnarUpdate> ColChunk<U>
Sourcepub fn from_trie(updates: UpdatesTyped<U>) -> Self
pub fn from_trie(updates: UpdatesTyped<U>) -> Self
Wrap an already sorted, consolidated trie as a resident chunk. The chunker
uses this to hand its melded UpdatesTyped blobs to the Chunk harness.
Sourcepub fn updates_mut(&mut self) -> &mut UpdatesTyped<U>
pub fn updates_mut(&mut self) -> &mut UpdatesTyped<U>
Mutable access to the backing trie (materializing if paged, cloning if the
Rc is shared), for builder closures that populate a chunk in place — e.g.
reduce_abelian.
Trait Implementations§
Source§impl<U: ColumnarUpdate> Accountable for ColChunk<U>
impl<U: ColumnarUpdate> Accountable for ColChunk<U>
Source§impl<U: ColumnarUpdate> Chunk for ColChunk<U>where
U::Time: 'static,
impl<U: ColumnarUpdate> Chunk for ColChunk<U>where
U::Time: 'static,
Source§fn merge(
in1: &mut VecDeque<Self>,
in2: &mut VecDeque<Self>,
out: &mut VecDeque<Self>,
)
fn merge( in1: &mut VecDeque<Self>, in2: &mut VecDeque<Self>, out: &mut VecDeque<Self>, )
Trie-native binary merge of the two deques’ front chunks through their
shared horizon, via trie_merger::merge_pair: it merges one input fully
and a prefix of the other (the survey/write_layer bulk range-copy),
leaving the survivor’s suffix as a cursor we materialize with
trie_merger::suffix_chunk and push back. The harness re-invokes.
One pair per call (not a resumable drain): merge_pair surveys each batch
from index 0, so re-passing a large survivor would re-survey its whole body
every call (quadratic). Re-materializing the suffix as a standalone chunk
keeps each survey bounded by the shrinking remainder instead.
Source§fn extract(
input: &mut VecDeque<Self>,
frontier: AntichainRef<'_, U::Time>,
residual: &mut Antichain<U::Time>,
keep: &mut VecDeque<Self>,
ship: &mut VecDeque<Self>,
)
fn extract( input: &mut VecDeque<Self>, frontier: AntichainRef<'_, U::Time>, residual: &mut Antichain<U::Time>, keep: &mut VecDeque<Self>, ship: &mut VecDeque<Self>, )
Partition the front chunk by frontier (keep >=, ship <), folding kept
times into residual, via trie_merger::extract. One chunk per call.
Source§fn advance(
input: &mut VecDeque<Self>,
frontier: AntichainRef<'_, U::Time>,
done: bool,
out: &mut VecDeque<Self>,
)
fn advance( input: &mut VecDeque<Self>, frontier: AntichainRef<'_, U::Time>, done: bool, out: &mut VecDeque<Self>, )
Advance times by frontier, consolidating each complete (key, val) group
and withholding the last unless done.
Streams the input one chunk at a time, holding at most a single chunk plus the
withheld trailing (key, val) group (the carry) — it never pulls the whole
chain into core. Cross-chunk consolidation happens only where a (key, val)
straddles a boundary: the (un-advanced) carry is melded onto the next chunk’s
head, a sorted-chain meld that just stitches that one group. [advance_trie]
then advances and consolidates the time runs within each chunk (keys / vals /
diffs stay columnar refs, no global re-sort). Grading the emitted chunks is
left to Chunk::settle.
Source§fn settle(input: &mut VecDeque<Self>, done: bool, out: &mut VecDeque<Self>)
fn settle(input: &mut VecDeque<Self>, done: bool, out: &mut VecDeque<Self>)
Maximal packing via the harness pack: coalesce by melding
the next trie onto the carry (adjacent chunks of a sorted, consolidated
chain, so meld’s “strictly greater first triple” precondition holds), split
with trie_merger::split_at, and seal through [seal_chunk] (the spill
point — pages a committed chunk when a spiller is installed).
Source§type Time = <<ColumnarLayout<U> as Layout>::TimeContainer as BatchContainer>::Owned
type Time = <<ColumnarLayout<U> as Layout>::TimeContainer as BatchContainer>::Owned
Source§impl<U: ColumnarUpdate> Clone for ColChunk<U>
impl<U: ColumnarUpdate> Clone for ColChunk<U>
Source§impl<U: ColumnarUpdate> Consolidate for ColChunk<U>
impl<U: ColumnarUpdate> Consolidate for ColChunk<U>
Source§impl<U: ColumnarUpdate> Default for ColChunk<U>
impl<U: ColumnarUpdate> Default for ColChunk<U>
Source§fn bounds(
&self,
) -> ((<Self::Cursor as Cursor>::Key<'_>, <Self::Cursor as Cursor>::Val<'_>, <Self::Cursor as Cursor>::TimeGat<'_>), (<Self::Cursor as Cursor>::Key<'_>, <Self::Cursor as Cursor>::Val<'_>, <Self::Cursor as Cursor>::TimeGat<'_>))
fn bounds( &self, ) -> ((<Self::Cursor as Cursor>::Key<'_>, <Self::Cursor as Cursor>::Val<'_>, <Self::Cursor as Cursor>::TimeGat<'_>), (<Self::Cursor as Cursor>::Key<'_>, <Self::Cursor as Cursor>::Val<'_>, <Self::Cursor as Cursor>::TimeGat<'_>))
(key, val, time) triples in the chunk.Source§impl<U: ColumnarUpdate> PushInto<((<U as ColumnarUpdate>::Key, <U as ColumnarUpdate>::Val), <U as ColumnarUpdate>::Time, <U as ColumnarUpdate>::Diff)> for ColChunk<U>
impl<U: ColumnarUpdate> PushInto<((<U as ColumnarUpdate>::Key, <U as ColumnarUpdate>::Val), <U as ColumnarUpdate>::Time, <U as ColumnarUpdate>::Diff)> for ColChunk<U>
Source§impl<U: ColumnarUpdate> SizableContainer for ColChunk<U>
impl<U: ColumnarUpdate> SizableContainer for ColChunk<U>
Source§fn at_capacity(&self) -> bool
fn at_capacity(&self) -> bool
Source§fn ensure_capacity(&mut self, _stash: &mut Option<Self>)
fn ensure_capacity(&mut self, _stash: &mut Option<Self>)
self to its desired capacity, if it has one. Read moreSource§impl<U: ColumnarUpdate> WithLayout for ColChunk<U>
impl<U: ColumnarUpdate> WithLayout for ColChunk<U>
Source§type Layout = ColumnarLayout<U>
type Layout = ColumnarLayout<U>
Auto Trait Implementations§
impl<U> !RefUnwindSafe for ColChunk<U>
impl<U> !Send for ColChunk<U>
impl<U> !Sync for ColChunk<U>
impl<U> !UnwindSafe for ColChunk<U>
impl<U> Freeze for ColChunk<U>
impl<U> Unpin for ColChunk<U>
impl<U> UnsafeUnpin for ColChunk<U>
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,
impl<C> Container for Cwhere
C: Accountable + Default + 'static,
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 moreSource§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
Source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign, for types that do not implement AddAssign.