Skip to main content

encode_batch

Function encode_batch 

Source
pub fn encode_batch<T: Serialize>(
    type_name: &'static str,
    metadata: &HashMap<String, String>,
    data: &[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.