pub struct RecordBatch {
pub length: i64,
pub nodes: Option<Vec<FieldNode>>,
pub buffers: Option<Vec<Buffer>>,
pub compression: Option<Box<BodyCompression>>,
pub variadic_buffer_counts: Option<Vec<i64>>,
}Expand description
A data header describing the shared memory layout of a “record” or “row” batch. Some systems call this a “row batch” internally and others a “record batch”.
Generated from these locations:
- Table
RecordBatchin the fileMessage.fbs:84
Fields§
§length: i64number of records / rows. The arrays in the batch should all have this length
nodes: Option<Vec<FieldNode>>Nodes correspond to the pre-ordered flattened logical schema
buffers: Option<Vec<Buffer>>Buffers correspond to the pre-ordered flattened buffer tree
The number of buffers appended to this list depends on the schema. For example, most primitive arrays will have 2 buffers, 1 for the validity bitmap and 1 for the values. For struct arrays, there will only be a single buffer for the validity (nulls) bitmap
compression: Option<Box<BodyCompression>>Optional compression of the message body
variadic_buffer_counts: Option<Vec<i64>>Some types such as Utf8View are represented using a variable number of buffers. For each such Field in the pre-ordered flattened logical schema, there will be an entry in variadicBufferCounts to indicate the number of number of variadic buffers which belong to that Field in the current RecordBatch.
For example, the schema
col1: Struct<alpha: Int32, beta: BinaryView, gamma: Float64>
col2: Utf8View
contains two Fields with variadic buffers so variadicBufferCounts will have
two entries, the first counting the variadic buffers of col1.beta and the
second counting col2’s.
This field may be omitted if and only if the schema contains no Fields with a variable number of buffers, such as BinaryView and Utf8View.
Implementations§
Source§impl RecordBatch
impl RecordBatch
Sourcepub fn builder() -> RecordBatchBuilder<()>
pub fn builder() -> RecordBatchBuilder<()>
Creates a RecordBatchBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_length: impl WriteAsDefault<i64, i64>, field_nodes: impl WriteAsOptional<Offset<[FieldNode]>>, field_buffers: impl WriteAsOptional<Offset<[Buffer]>>, field_compression: impl WriteAsOptional<Offset<BodyCompression>>, field_variadic_buffer_counts: impl WriteAsOptional<Offset<[i64]>>, ) -> Offset<Self>
Trait Implementations§
Source§impl Clone for RecordBatch
impl Clone for RecordBatch
Source§fn clone(&self) -> RecordBatch
fn clone(&self) -> RecordBatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecordBatch
impl Debug for RecordBatch
Source§impl Default for RecordBatch
impl Default for RecordBatch
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>,
Source§impl Hash for RecordBatch
impl Hash for RecordBatch
Source§impl Ord for RecordBatch
impl Ord for RecordBatch
Source§fn cmp(&self, other: &RecordBatch) -> Ordering
fn cmp(&self, other: &RecordBatch) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RecordBatch
impl PartialEq for RecordBatch
Source§impl PartialOrd for RecordBatch
impl PartialOrd for RecordBatch
Source§impl Serialize for RecordBatch
impl Serialize for RecordBatch
Source§impl<'a> TryFrom<RecordBatchRef<'a>> for RecordBatch
impl<'a> TryFrom<RecordBatchRef<'a>> for RecordBatch
impl Eq for RecordBatch
impl StructuralPartialEq for RecordBatch
impl VectorWrite<Offset<RecordBatch>> for RecordBatch
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<RecordBatch>> for RecordBatch
impl WriteAsOffset<RecordBatch> for RecordBatch
impl<T0: WriteAsDefault<i64, i64>, T1: WriteAsOptional<Offset<[FieldNode]>>, T2: WriteAsOptional<Offset<[Buffer]>>, T3: WriteAsOptional<Offset<BodyCompression>>, T4: WriteAsOptional<Offset<[i64]>>> WriteAsOffset<RecordBatch> for RecordBatchBuilder<(T0, T1, T2, T3, T4)>
impl WriteAsOptional<Offset<RecordBatch>> for RecordBatch
Auto Trait Implementations§
impl Freeze for RecordBatch
impl RefUnwindSafe for RecordBatch
impl Send for RecordBatch
impl Sync for RecordBatch
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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