Skip to main content

encode_batch

Function encode_batch 

Source
pub fn encode_batch<'a, T: Serialize + 'a>(
    type_name: &'static str,
    metadata: &HashMap<String, String>,
    data: impl IntoIterator<Item = &'a T>,
    fields: &[JsonFieldSpec],
) -> Result<RecordBatch, ArrowError>
Expand description

Encodes typed records into an Arrow record batch with the supplied schema metadata.

ยงErrors

Returns an error if JSON serialization fails or if a field cannot be encoded into the requested Arrow column type.