Skip to main content

Module arrow_util

Module arrow_util 

Source
Expand description

Arrow IPC <-> JSON row helpers, shared by the embedded SQL surface ([Database::sql] / sql_arrow / sql_rows) and the optional remote HTTP client. Kept here (rather than inside remote.rs) so the default embedded build — which has no HTTP dependency — can still decode the Arrow IPC bytes that MongrelSession::run produces.

Functions§

batch_to_rows
Materialize one RecordBatch into JSON-row maps (column name → value).
batches_to_ipc
Encode RecordBatches as Arrow IPC file bytes — the wire format the daemon and the NAPI addon both produce. Mirrors the node addon’s native_cols_to_ipc_from_batches.
batches_to_rows
Flatten a slice of batches into a single list of JSON-row maps.
read_arrow_ipc
Decode Arrow IPC file bytes (the format MongrelSession and the daemon both emit) into RecordBatches. An empty input yields an empty vec.