pub struct RowCursorStream {
converter: RowConverter,
column_expressions: Vec<Arc<dyn PhysicalExpr>>,
streams: FusedStreams,
reservation: MemoryReservation,
rows: ReusableRows,
}Expand description
A PartitionedStream that wraps a set of SendableRecordBatchStream
and computes RowValues based on the provided PhysicalSortExpr
Note: the stream returns an error if the consumer buffers more than one RowValues (i.e. holds on to two RowValues
from the same partition at the same time).
Fields§
§converter: RowConverterConverter to convert output of physical expressions
column_expressions: Vec<Arc<dyn PhysicalExpr>>The physical expressions to sort by
streams: FusedStreamsInput streams
reservation: MemoryReservationTracks the memory used by converter
rows: ReusableRowsAllocated rows for each partition, we keep two to allow for buffering one in the consumer of the stream
Implementations§
Source§impl RowCursorStream
impl RowCursorStream
pub fn try_new( schema: &Schema, expressions: &LexOrdering, streams: Vec<SendableRecordBatchStream>, reservation: MemoryReservation, ) -> Result<Self>
fn convert_batch( &mut self, batch: &RecordBatch, stream_idx: usize, ) -> Result<RowValues>
Trait Implementations§
Source§impl Debug for RowCursorStream
impl Debug for RowCursorStream
Auto Trait Implementations§
impl Freeze for RowCursorStream
impl !RefUnwindSafe for RowCursorStream
impl Send for RowCursorStream
impl !Sync for RowCursorStream
impl Unpin for RowCursorStream
impl !UnwindSafe for RowCursorStream
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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