pub struct StreamingMerger<'a> { /* private fields */ }Expand description
Feature-internal streaming wrapper around KWayMerger (issue #1668,
stages 2-5d) — reconciles ONE clustering-key group at a time DIRECTLY off
merger’s heap (see the module doc’s “two independent accumulation
dimensions” section for the full design and its correctness proof).
Holds ONLY its own drain/reconciliation state; it does not add fields to
KWayMerger itself, so the existing KWayMerger { .. } struct-literal
unit tests in mod.rs are unaffected by this module’s changes.
Implementations§
Source§impl<'a> StreamingMerger<'a>
impl<'a> StreamingMerger<'a>
Sourcepub fn new(merger: &'a mut KWayMerger) -> Self
pub fn new(merger: &'a mut KWayMerger) -> Self
Wrap a KWayMerger for streaming cluster-group increments.
Sourcepub fn step_streaming(&mut self) -> Result<StreamingStep>
pub fn step_streaming(&mut self) -> Result<StreamingStep>
Yield the next streaming increment.
Drains any already-reconciled, ready-to-emit rows first; otherwise
pulls raw entries directly off the heap, siphoning carriers into the
running accumulator and growing the current clustering-key group,
until either a reconciled row becomes available, the partition ends
(PartitionEnd), or the whole merge ends (Complete). See the
module doc for the full design and its correctness proof.