Struct datafusion_physical_plan::sorts::RowIndex
source · pub struct RowIndex {
pub stream_idx: usize,
pub batch_idx: usize,
pub row_idx: usize,
}
Expand description
A RowIndex
identifies a specific row in a logical stream.
Each stream is identified by an stream_idx
and is formed from a
sequence of RecordBatches batches, each of which is identified by
a unique batch_idx
within that stream.
This is used by SortPreservingMergeStream
to identify which
the order of the tuples in the final sorted output stream.
┌────┐ ┌────┐ ┌────┐ RecordBatch
│ │ │ │ │ │
│ C1 │ │... │ │ CN │◀─────── (batch_idx = 0)
│ │ │ │ │ │
└────┘ └────┘ └────┘
┌────┐ ┌────┐ ┌────┐ RecordBatch
│ │ │ │ │ │
│ C1 │ │... │ │ CN │◀─────── (batch_idx = 1)
│ │ │ │ │ │
└────┘ └────┘ └────┘
┌────┐
│ │ ...
│ C1 │
│ │ ┌────┐ RecordBatch
└────┘ │ │
│ CN │◀────── (batch_idx = M-1)
│ │
└────┘
"Stream"s each with Stream N has M
a potentially RecordBatches
different number of
RecordBatches
Fields§
§stream_idx: usize
The index of the stream (uniquely identifies the stream)
batch_idx: usize
The index of the batch within the stream’s VecDequeue.
row_idx: usize
The row index within the batch
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RowIndex
impl RefUnwindSafe for RowIndex
impl Send for RowIndex
impl Sync for RowIndex
impl Unpin for RowIndex
impl UnwindSafe for RowIndex
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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