ddn.data.arrow.ipc
The Arrow IPC file reader of ddn.df (ADR-2026-10-24-15, amended 2026-10-29): the .arrows/Feather V2 format read through a self-owned minimal FlatBuffers subset (the Message/Schema/Field/ RecordBatch/Footer/Block tables the format defines - no FlatBuffers library, no generated code). Admitted types mirror the C Data tier (flat kinds, large_list/list, dictionary-encoded categorical, decimal128); STRUCT and unsupported shapes reject naming themselves. Uncompressed bodies and LZ4_FRAME compression decode (the DDN pure-D codec); other codecs reject naming themselves. Every length, offset and count is validated before any allocation: malformed input throws, never a partial frame. The private DDNDF1 format (ddn.df.arrow_ipc) is a distinct boundary, not relabelled here.
Copyright
Types 11
const(ubyte)[] bufsize_t posprivate FbTable batchprivate const(ubyte)[] bodyprivate long[][] nodesprivate long[][] buffersprivate size_t nextNodeprivate size_t nextBufferprivate bool lz4private bool loadedThe Arrow IPC batch reader: the codec tier below the frame and query adapters. It owns its input - either a whole in-memory file image or a file path whose handle opens lazily at the first batch and closes on close() (idempotent; the footer loads through an open-read-close pass so an unpulled source holds no handle). The footer, schema and dictionaries load eagerly; each nextBatch decodes one record batch into a ColumnBatch (one chunk per column). Projection is the codec's column-subset capability: projected fields skip decoding entirely, under the DECIMAL totality rule (a DECIMAL column stays in the scan because its decode may reject).
private const(ubyte)[] wholeprivate string pathprivate File fileprivate FieldSpec[] fieldsprivate long[][] dictBlocksprivate long[][] batchBlocksprivate ArrayData[long] dictValuesprivate size_t nextBlockprivate bool closedprivate string[] projectedNamesprivate bool footerLoadedSchema schema() @trustedReturns: the file's structural schema (every field; the projection does not change it).Nullable!ColumnBatch nextBatch() @trustedDecodes the next record batch into a `ColumnBatch` (one chunk per column; projected fields skip decoding). Returns null at the end or after `close`.IpcBatchReader reacquire() @safeA fresh reader over the same input with the same projection (one independent pull lifecycle per acquisition).IpcBatchReader project(scope string[] columns) @safeprivate ubyte[] bufprivate uint[] slotsprivate ubyte[] kindsprivate long[] valuesprivate size_t[] writeEndsThe body compression of written files (none by default; LZ4 as the explicit option - our own bytes stay codec-free unless asked).
private File fileprivate string[] namesprivate DataType[] dtypesprivate long[][] batchBlocksprivate IpcCompression compressionprivate bool finished_private long writtenthis(File file, string[] names, DataType[] dtypes,
IpcCompression compression)Takes ownership of the opened output file and writes the magic and schema message.Functions 23
Message messageAt(const(ubyte)[] bytes,
long offsetIn, int metaLenIn, long bodyLengthIn) @safe purevoid buildTypeField(ref FbBuilder b, DataType dtype,
out size_t typeEnd, out ubyte typeTag) @trusted pure nothrowsize_t buildField(ref FbBuilder b, string name, DataType dtype,
long fieldOrdinal) @trusted puresize_t buildMessage(ref FbBuilder b, ubyte headerType,
size_t headerEnd, long bodyLength) @trusted pure nothrowsize_t buildRecordBatch(ref FbBuilder b, long length,
long[][] nodes, long[][] buffers, bool lz4) @trusted pure nothrowubyte[] buildIpcBytes(ColumnBatch batch,
IpcCompression compression = IpcCompression.NONE) @trustedSerializes a frame to the Arrow IPC file format (`.arrows`, Feather V2): one schema message, one dictionary batch per categorical column, one record-batch message per aligned chunk row (a frame who...Variables 21
IPC_MAGIC = "ARROW1"IPC_CONTINUATION = 0xFFFF_FFFFIPC_MAX_METADATA = 64 * 1024 * 1024MSG_DICTIONARY = 2MSG_RECORD_BATCH = 3TYPE_INT = 2TYPE_FLOAT = 3TYPE_UTF8 = 5TYPE_BOOL = 6TYPE_DECIMAL = 7TYPE_TIME = 9TYPE_TIMESTAMP = 10TYPE_DATE = 8TYPE_DURATION = 18TYPE_LIST = 12TYPE_STRUCT = 13TYPE_LARGE_UTF8 = 20TYPE_LARGE_LIST = 21CODEC_LZ4_FRAME = 0CODEC_ZSTD = 1size_t ipcColumnsDecoded