pub struct PartitionScanner<S> { /* private fields */ }Expand description
Streaming scanner that splits sorted input batches into partition chunks.
Implementations§
Source§impl<S: BatchSource> PartitionScanner<S>
impl<S: BatchSource> PartitionScanner<S>
Sourcepub fn new(source: S, key_columns: Vec<usize>) -> Result<Self>
pub fn new(source: S, key_columns: Vec<usize>) -> Result<Self>
Create a scanner over batches that are already ordered by partition key.
key_columns are indexes in each projected RecordBatch. An empty
key list treats the full input stream as a single partition.
Sourcepub fn next_chunk(&mut self) -> Result<Option<PartitionChunk>>
pub fn next_chunk(&mut self) -> Result<Option<PartitionChunk>>
Return the next partition chunk with start/end boundary markers.
Sourcepub fn for_each_partition<F>(&mut self, visit: F) -> Result<()>
pub fn for_each_partition<F>(&mut self, visit: F) -> Result<()>
Invoke visit once per logical partition.
The partition view owns chunk descriptors. Row data remains shared with the underlying batches, so callers can evaluate window or rolling logic without copying whole partitions.
Auto Trait Implementations§
impl<S> Freeze for PartitionScanner<S>where
S: Freeze,
impl<S> RefUnwindSafe for PartitionScanner<S>where
S: RefUnwindSafe,
impl<S> Send for PartitionScanner<S>where
S: Send,
impl<S> Sync for PartitionScanner<S>where
S: Sync,
impl<S> Unpin for PartitionScanner<S>where
S: Unpin,
impl<S> UnsafeUnpin for PartitionScanner<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PartitionScanner<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more