pub enum ColumnChunk<D: Columnar, T: Columnar, R: Columnar> {
Resident(Rc<Column<(D, T, R)>>, u8),
Spilled(Rc<SpilledBody<D>>),
}Expand description
A sorted, consolidated run of (D, T, R) updates, resident or spilled.
Every chunk carries a generational depth, fixed at creation: fresh chunks
are depth 0, a merge output is one generation past its deepest input
(saturating at u8::MAX, where remerged long-lived chunks stay), and
rewrites within a generation (extract, advance, settle coalescing)
preserve depth. At spill time the depth becomes the pool’s ChunkHints,
so repeatedly merged (older, colder) data lands in deeper eviction bands.
Variants§
Resident(Rc<Column<(D, T, R)>>, u8)
Body on the heap, shared via Rc, with its generational depth.
Spilled(Rc<SpilledBody<D>>)
Body in the pool. See SpilledBody.
Implementations§
Source§impl<D: Columnar, T: Columnar, R: Columnar> ColumnChunk<D, T, R>
impl<D: Columnar, T: Columnar, R: Columnar> ColumnChunk<D, T, R>
Sourcepub fn from_column(column: Column<(D, T, R)>) -> Self
pub fn from_column(column: Column<(D, T, R)>) -> Self
Wrap a sorted, consolidated, non-empty column as a resident chunk of the youngest generation.
Sourcepub fn into_column(self) -> Column<(D, T, R)>
pub fn into_column(self) -> Column<(D, T, R)>
The body as an owned column. A spilled body is copied out of the pool within this call. A shared resident body is copied.
Sourcepub fn is_spilled(&self) -> bool
pub fn is_spilled(&self) -> bool
True when the body lives in the pool.
Trait Implementations§
Source§impl<D: Columnar, T: Columnar, R: Columnar> Accountable for ColumnChunk<D, T, R>
impl<D: Columnar, T: Columnar, R: Columnar> Accountable for ColumnChunk<D, T, R>
Source§impl<D, T, R> Chunk for ColumnChunk<D, T, R>
impl<D, T, R> Chunk for ColumnChunk<D, T, R>
Source§const TARGET: usize = 65536
const TARGET: usize = 65536
A nominal record count for the harness’s fuel and ladder accounting,
not a bound. Actual chunk sizing is by serialized bytes: merge and
extract cut output at the Column ship threshold, and settle
grades by at_commit_size, so a chunk of narrow records can hold more
records than this and nothing here consults it.
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>, )
Column::merge_from does the work: gallop bulk-copies for disjoint
runs, semigroup consolidation on equal (data, time), output cut at
the ship threshold. A survivor pushed back untouched keeps its
original form, in particular a spilled body is neither rebuilt nor
re-spilled.
Fronts whose data ranges are disjoint never load at all: the resident fence entries decide, and the lower front moves to the output verbatim.
Source§fn extract(
input: &mut VecDeque<Self>,
frontier: AntichainRef<'_, T>,
residual: &mut Antichain<T>,
keep: &mut VecDeque<Self>,
ship: &mut VecDeque<Self>,
)
fn extract( input: &mut VecDeque<Self>, frontier: AntichainRef<'_, T>, residual: &mut Antichain<T>, keep: &mut VecDeque<Self>, ship: &mut VecDeque<Self>, )
Partition one front chunk by frontier, folding kept times into
residual. One chunk per call, so the harness settles both sides
between chunks. Output is cut at the ship threshold.
Source§fn advance(
input: &mut VecDeque<Self>,
frontier: AntichainRef<'_, T>,
done: bool,
out: &mut VecDeque<Self>,
)
fn advance( input: &mut VecDeque<Self>, frontier: AntichainRef<'_, T>, done: bool, out: &mut VecDeque<Self>, )
Advance times by frontier and consolidate, withholding the trailing
D group as the carry unless done (its updates may continue in input
this call has not seen).
The input concatenates into the carry’s container, so a group that grows across many calls is appended to, not rebuilt. Each record is copied once on arrival, keeping the run linear. Advancing is lattice-monotone but not order-monotone, so each group’s advanced times are re-sorted before adjacent equal times fold.
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>)
Grade by serialized bytes and commit: spilled chunks pass through
untouched, resident chunks at the commit size commit as they are, and
smaller neighbors coalesce until the accumulation reaches it.
Committing is the spill hook (see ColumnChunk::commit). A
sub-threshold tail is withheld as the carry unless done.
Source§impl<K, V, T, R> UnloadChunk for ColumnChunk<(K, V), T, R>
impl<K, V, T, R> UnloadChunk for ColumnChunk<(K, V), T, R>
Source§type Staging = <((K, V), T, R) as Columnar>::Container
type Staging = <((K, V), T, R) as Columnar>::Container
The flat columnar accumulation. Appends are bulk column-range copies, and a group straddling chunks stitches by plain concatenation.
Source§type Probes<'a> = <<K as Columnar>::Container as Borrow>::Borrowed<'a>
type Probes<'a> = <<K as Columnar>::Container as Borrow>::Borrowed<'a>
A borrowed key column, e.g. of a Column<K> the consumer assembled
from its sorted, deduplicated probe keys.
Source§fn probe_count(probes: Self::Probes<'_>) -> usize
fn probe_count(probes: Self::Probes<'_>) -> usize
Source§fn locate(&self, probes: Self::Probes<'_>, probe_index: usize) -> Ordering
fn locate(&self, probes: Self::Probes<'_>, probe_index: usize) -> Ordering
probes[probe_index] falls relative to this chunk’s key span:
Less before the first key, Equal within [first, last], Greater
past the last key. Read moreSource§fn extract_into(
&self,
probes: Self::Probes<'_>,
probe_index: &mut usize,
staging: &mut Self::Staging,
)
fn extract_into( &self, probes: Self::Probes<'_>, probe_index: &mut usize, staging: &mut Self::Staging, )
*probe_index
into staging, advancing *probe_index past every probe strictly
below this chunk’s last key. Read moreSource§fn fetch_into(&self, staging: &mut Self::Staging)
fn fetch_into(&self, staging: &mut Self::Staging)
staging (the scan path).Auto Trait Implementations§
impl<D, T, R> !RefUnwindSafe for ColumnChunk<D, T, R>
impl<D, T, R> !Send for ColumnChunk<D, T, R>
impl<D, T, R> !Sync for ColumnChunk<D, T, R>
impl<D, T, R> !UnwindSafe for ColumnChunk<D, T, R>
impl<D, T, R> Freeze for ColumnChunk<D, T, R>
impl<D, T, R> Unpin for ColumnChunk<D, T, R>
impl<D, T, R> UnsafeUnpin for ColumnChunk<D, T, R>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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.