BuildersLike

Trait BuildersLike 

Source
pub trait BuildersLike {
    type Row;
    type Error: Error;

    // Required methods
    fn append_row(&mut self, row: Self::Row) -> Result<(), Self::Error>;
    fn append_option_row(
        &mut self,
        row: Option<Self::Row>,
    ) -> Result<(), Self::Error>;
    fn finish_into_batch(self) -> RecordBatch;

    // Provided method
    fn try_finish_into_batch(self) -> Result<RecordBatch, Self::Error>
       where Self: Sized { ... }
}
Expand description

Unified interface for building batches across typed and dynamic schemas.

Required Associated Types§

Source

type Row

The row representation accepted by these builders.

Source

type Error: Error

The error type returned by these builders.

Required Methods§

Source

fn append_row(&mut self, row: Self::Row) -> Result<(), Self::Error>

Append a non-null row to all columns.

§Errors

Returns an error if the dynamic path detects an append/type/builder issue.

Source

fn append_option_row( &mut self, row: Option<Self::Row>, ) -> Result<(), Self::Error>

Append an optional row; None appends a null to all columns.

§Errors

Returns an error if the dynamic path detects an append/type/builder issue.

Source

fn finish_into_batch(self) -> RecordBatch

Finish building and convert accumulated arrays into a RecordBatch.

Provided Methods§

Source

fn try_finish_into_batch(self) -> Result<RecordBatch, Self::Error>
where Self: Sized,

Try to finish building a RecordBatch, returning an error with richer diagnostics when available (e.g., dynamic nullability).

§Errors

Returns an error when batch assembly fails (e.g., dynamic nullability).

Implementations on Foreign Types§

Source§

impl BuildersLike for DynBuilders

Implement unified builders for dynamic builders.

Implementors§