pub fn decode_arrow_ipc(ipc_buf: &[u8]) -> Result<DoraArray>Expand description
Decode an Arrow IPC stream byte buffer back into ArrayData.
Expects the buffer to contain exactly one record batch with a single
column named "data", as produced by encode_arrow_ipc. Returns an
error for an empty, truncated, or otherwise malformed stream, and for any
payload larger than 256 MB.
ยงExample
use dora_node_api::IntoArrow;
use dora_node_api::arrow_utils::{decode_arrow_ipc, encode_arrow_ipc};
let ipc = encode_arrow_ipc(&"hello".to_string().into_arrow())?;
let decoded = decode_arrow_ipc(&ipc)?;
let text: String = (&decoded).try_into()?;
assert_eq!(text, "hello");