Struct RecordBatch

Source
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 RecordBatch in the file Message.fbs:84

Fields§

§length: i64

number 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

Source

pub fn builder() -> RecordBatchBuilder<()>

Creates a RecordBatchBuilder for serializing an instance of this table.

Source

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

Source§

fn clone(&self) -> RecordBatch

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecordBatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RecordBatch

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RecordBatch

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for RecordBatch

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for RecordBatch

Source§

fn cmp(&self, other: &RecordBatch) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for RecordBatch

Source§

fn eq(&self, other: &RecordBatch) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for RecordBatch

Source§

fn partial_cmp(&self, other: &RecordBatch) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for RecordBatch

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> TryFrom<RecordBatchRef<'a>> for RecordBatch

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: RecordBatchRef<'a>) -> Result<Self>

Performs the conversion.
Source§

impl Eq for RecordBatch

Source§

impl StructuralPartialEq for RecordBatch

Source§

impl VectorWrite<Offset<RecordBatch>> for RecordBatch

§Safety

The planus compiler generates implementations that initialize the bytes in write_values.

Source§

impl WriteAs<Offset<RecordBatch>> for RecordBatch

Source§

impl WriteAsOffset<RecordBatch> for RecordBatch

Source§

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)>

Source§

impl WriteAsOptional<Offset<RecordBatch>> for RecordBatch

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,