pub struct RecordBatch {
pub num_rows: usize,
pub schema: Vec<ColumnSchema>,
pub float_columns: Vec<Float64Column>,
pub int_columns: Vec<Int32Column>,
pub uint8_columns: Vec<Uint8Column>,
}Expand description
A record batch: a named collection of typed columns.
This is the primary unit for zero-copy data transfer. Analogous to Arrow RecordBatch.
Fields§
§num_rows: usizeNumber of rows in the batch.
schema: Vec<ColumnSchema>Schema: column names and types.
float_columns: Vec<Float64Column>Float64 columns.
int_columns: Vec<Int32Column>Int32 columns.
uint8_columns: Vec<Uint8Column>Uint8 columns.
Implementations§
Source§impl RecordBatch
impl RecordBatch
Sourcepub fn add_float64(&mut self, name: &str, values: Vec<f64>, shape: Vec<usize>)
pub fn add_float64(&mut self, name: &str, values: Vec<f64>, shape: Vec<usize>)
Add a Float64 column.
Sourcepub fn add_int32(&mut self, name: &str, values: Vec<i32>, shape: Vec<usize>)
pub fn add_int32(&mut self, name: &str, values: Vec<i32>, shape: Vec<usize>)
Add an Int32 column.
Sourcepub fn add_uint8(&mut self, name: &str, values: Vec<u8>, shape: Vec<usize>)
pub fn add_uint8(&mut self, name: &str, values: Vec<u8>, shape: Vec<usize>)
Add a Uint8 column.
Sourcepub fn byte_size(&self) -> usize
pub fn byte_size(&self) -> usize
Total byte size of all buffers (for transfer cost estimation).
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Number of columns.
Trait Implementations§
Source§impl Clone for RecordBatch
impl Clone for RecordBatch
Source§fn clone(&self) -> RecordBatch
fn clone(&self) -> RecordBatch
Returns a duplicate of the value. Read more
1.0.0 · 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 RecordBatch
impl Debug for RecordBatch
Source§impl Default for RecordBatch
impl Default for RecordBatch
Source§fn default() -> RecordBatch
fn default() -> RecordBatch
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RecordBatch
impl<'de> Deserialize<'de> for RecordBatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RecordBatch
impl RefUnwindSafe for RecordBatch
impl Send for RecordBatch
impl Sync for RecordBatch
impl Unpin for RecordBatch
impl UnsafeUnpin for RecordBatch
impl UnwindSafe for RecordBatch
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§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.