[][src]Struct arrow::record_batch::RecordBatch

pub struct RecordBatch { /* fields omitted */ }

A batch of column-oriented data

Methods

impl RecordBatch[src]

pub fn try_new(schema: Arc<Schema>, columns: Vec<ArrayRef>) -> Result<Self>[src]

Creates a RecordBatch from a schema and columns

Expects the following:

  • the vec of columns to not be empty
  • the schema and column data types to have equal lengths and match
  • each array in columns to have the same length

pub fn schema(&self) -> &Arc<Schema>[src]

Returns the schema of the record batch

pub fn num_columns(&self) -> usize[src]

Number of columns in the record batch

pub fn num_rows(&self) -> usize[src]

Number of rows in each column

pub fn column(&self, i: usize) -> &ArrayRef[src]

Get a reference to a column's array by index

pub fn columns(&self) -> &[ArrayRef][src]

Get a reference to all columns

Trait Implementations

impl Clone for RecordBatch[src]

impl<'_> From<&'_ StructArray> for RecordBatch[src]

fn from(struct_array: &StructArray) -> Self[src]

Create a record batch from struct array.

This currently does not flatten and nested struct types

impl Into<StructArray> for RecordBatch[src]

impl Send for RecordBatch[src]

impl Sync for RecordBatch[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.