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§
Required Methods§
Sourcefn append_row(&mut self, row: Self::Row) -> Result<(), Self::Error>
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.
Sourcefn append_option_row(
&mut self,
row: Option<Self::Row>,
) -> Result<(), Self::Error>
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.
Sourcefn finish_into_batch(self) -> RecordBatch
fn finish_into_batch(self) -> RecordBatch
Finish building and convert accumulated arrays into a RecordBatch
.
Provided Methods§
Sourcefn try_finish_into_batch(self) -> Result<RecordBatch, Self::Error>where
Self: Sized,
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.
impl BuildersLike for DynBuilders
Implement unified builders for dynamic builders.