Skip to main content

Module arrow

Module arrow 

Source
Available on crate feature arrow only.
Expand description

Convert rec records into Apache Arrow RecordBatches.

Gated behind the arrow cargo feature. Honors %type: declarations from the rset descriptor; untyped fields fall back to Utf8.

Functions§

build_column
build_columns
build_schema
collect_rows
collect_rows_from_rset
format_arrow_value
map_arrow_to_rec_type
Inverse of map_rec_type. Returns Ok(None) for Utf8, since rec’s untyped default is string and emitting %type: <name> string would be noise. Returns Err for Arrow types we don’t know how to round-trip.
map_rec_type
parse_rec_bool
rec_to_filtered_batch
Build a RecordBatch for the records of record_type that match the given selection expression, using the caller-provided schema (so the column set stays stable even when the filter excludes every record that has a particular field).
rec_to_filtered_batch_from_rset
Same as rec_to_filtered_batch but for an arbitrary Rset.
rec_to_record_batch
rec_to_record_batch_from_rset
Build the (schema, batch) for an arbitrary Rset, including anonymous record sets that have no %rec: descriptor (so they can’t be looked up by Db::rset_by_type).
record_batches_to_rec_string
Serialize batches as a .rec file body containing a single record set of type record_type. The descriptor block carries %rec:, one %type: line per non-Utf8 column, and one %mandatory: line per non-nullable Arrow field. Null values are omitted from the produced records (rec convention: absent field == null).
split_type_decl