pub struct ColumnarBatch { /* private fields */ }Expand description
Column-oriented transfer batch. Physical operators may remain row-oriented internally; API consumers can process one bounded batch without retaining the complete result set or rebuilding columns themselves.
Implementations§
Source§impl ColumnarBatch
impl ColumnarBatch
Sourcepub fn from_batch(schema: &[String], batch: Batch) -> Self
pub fn from_batch(schema: &[String], batch: Batch) -> Self
Convert a positional physical batch without crossing the legacy map-backed row boundary. Repeated output labels are matched to repeated logical schema positions in order, so differently-valued duplicate columns remain distinct for wire and cursor consumers.
Sourcepub fn from_rows(schema: &[String], rows: Vec<ResultRow>) -> Self
pub fn from_rows(schema: &[String], rows: Vec<ResultRow>) -> Self
Move map-backed rows into positional columns. A missing projected value
has SQL NULL semantics.
pub fn schema(&self) -> RowSchema
pub fn columns(&self) -> &[ColumnVector]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn into_positional_rows(self) -> Vec<Vec<Value>>
pub fn into_positional_rows(self) -> Vec<Vec<Value>>
Convert the column vectors to row-major positional values without passing through a name-keyed map.
Trait Implementations§
Source§impl Clone for ColumnarBatch
impl Clone for ColumnarBatch
Source§fn clone(&self) -> ColumnarBatch
fn clone(&self) -> ColumnarBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnarBatch
impl Debug for ColumnarBatch
Source§impl PartialEq for ColumnarBatch
impl PartialEq for ColumnarBatch
impl StructuralPartialEq for ColumnarBatch
Auto Trait Implementations§
impl Freeze for ColumnarBatch
impl RefUnwindSafe for ColumnarBatch
impl Send for ColumnarBatch
impl Sync for ColumnarBatch
impl Unpin for ColumnarBatch
impl UnsafeUnpin for ColumnarBatch
impl UnwindSafe for ColumnarBatch
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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