Serialize Apache Arrow data as record batches in the columnar IPC stream
Answer: In Arrow, a record batch is the primitive unit used when serializing columnar data. It is an ordered collection of arrays, and the field names and types form that batch's schema. IPC writes those batches as binary payloads in a one-way stream.
Record batches and schema
A record batch is, semantically, an ordered collection of arrays known as fields. Those fields share a length, yet they may use different data types. The batch schema is the collective set of field names and types.
IPC defines a protocol that serializes record batches as binary payloads, then reconstructs them without copying memory. The stream is one-way and carries Schema, RecordBatch, and DictionaryBatch messages. A schema is an ordered sequence of fields, each with a name and a type.
| record batch | schema | |---|---| | ordered collection of arrays | field names and types | | Schema RecordBatch DictionaryBatch | message types in IPC | | IPC stream | Schema, then record batches |
Writing a stream
C++ exposes RecordBatchWriter as an abstract interface whose job is writing a stream of record batches. WriteRecordBatch appends one record batch onto that stream. The writer counts IPC messages written, record batches written, and dictionary batches written.
Raw size is the original buffer sizes. Serialized size includes padding and, optionally, compression. Closing the actual OutputStream is the user's responsibility.
See also
Claims
- id: C1 claim: A record batch is the primitive unit of serialized Arrow columnar data. source: S1 evidence: "The primitive unit of serialized data in the columnar format is the “record batch”."
- id: C2 claim: A record batch's field names and types together form its schema. source: S1 evidence: "A record batch’s field names and types collectively form the batch’s schema ."
- id: C3 claim: RecordBatchWriter is the abstract interface for writing a stream of record batches. source: S2 evidence: "Abstract interface for writing a stream of record batches"
Sources
- [S1] Arrow Columnar Format. Apache Arrow docs. https://arrow.apache.org/docs/format/Columnar.html . License: Apache-2.0. Accessed 2026-11-20.
- [S2] writer.h (RecordBatchWriter). Apache Arrow source. https://raw.githubusercontent.com/apache/arrow/main/cpp/src/arrow/ipc/writer.h . License: Apache-2.0. Accessed 2026-11-20.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache Arrow docs, Arrow Columnar Format; Apache Arrow source, writer.h (RecordBatchWriter). Apache-2.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Apache Arrow docs, Arrow Columnar Format; Apache Arrow source, writer.h (RecordBatchWriter). Apache-2.0.
Cite this
iinventedlight. 2026. "Serialize Apache Arrow data as record batches in the columnar IPC stream." iinventedlight Library, iil:note:nb35nmjg, version of 2026-11-20. https://iinventedlight.com/library/notes/arrow-record-batches/. License: CC-BY-4.0.
@misc{iil_note_nb35nmjg,
author = {{iinventedlight}},
title = {{Serialize Apache Arrow data as record batches in the columnar IPC stream}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-20},
url = {https://iinventedlight.com/library/notes/arrow-record-batches/},
note = {Permanent ID iil:note:nb35nmjg. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- arrow-record-batches.table.json (table; CC-BY-4.0)
- arrow-record-batches.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/arrow-record-batches.md.