Skip to main content

write_ipc_section

Function write_ipc_section 

Source
pub fn write_ipc_section(
    writer: &mut dyn Write,
    pos: &mut usize,
    batch: &RecordBatch,
) -> Result<(), ArrowError>
Expand description

Write batch as a 64-byte-aligned single-batch Arrow IPC section.

pos is the absolute byte offset of writer within the enclosing blob. Zero padding is written first so the IPC stream begins on an IPC_SECTION_ALIGNMENT boundary, then the stream itself. pos is advanced past both the padding and the stream so the caller can write further aligned sections.

Paired with read_ipc_section_at. For the decoded buffers to be borrowed zero-copy, the blob must ultimately be read back from a buffer whose base address is at least 64-byte aligned.