Skip to main content

Module ipc

Module ipc 

Source
Expand description

Arrow IPC stream helpers for the binary-valued wire fields.

Many VGI wire fields are binary columns carrying an IPC-serialized Arrow object — either a full record batch (schema + 1 row + EOS) or a bare schema (schema message + EOS). The bytes are byte-compatible with the canonical Python worker and the C++ extension.

Functions§

arc_schema
Convenience: wrap a schema in an Arc.
read_batch
Read the first record batch from an Arrow IPC stream.
read_schema
Read the schema of an Arrow IPC stream without requiring a batch.
write_batch
Serialize a record batch to an Arrow IPC stream (schema + batch + EOS).
write_batch_with_schema
Like write_batch but emits the IPC schema message from schema instead of batch.schema(). The columns are written as-is. Used to declare a column non-nullable on the wire while its array still carries NULLs (arrow’s safe constructors reject this, but the C++ extension requires it for inlined optimizer hints — see catalog::serialize_items).
write_schema
Serialize a bare schema to an Arrow IPC stream (schema message + EOS).
write_schema_ref
Convenience: serialize a SchemaRef.