View Source arrow_ipc_record_batch (arrow v0.1.0)
Provides a record and functions to deal with RecordBatches
A RecordBatch[1] represents a list of equal length arrays and their coresponding buffers. This module provides a record and a function to manage all the metadata required to represent a RecordBatch. Metadata such as:
length: The number of rows or records. In other words, the length of an array.nodes: A list of maps, where each map has the length and null count of an arraybuffers: A list of maps, where each map has the length and the offset (from the beginning of the message body) of a buffer of an array.compression: The compression applied on the body of the Record Batch. Can either byundefined(i.e. no compression),zstdfor Zstandard[2], orlz4_framefor LZ4 Frame[3]. Defaults toundefined.
Currently, compression is not supported, but it has been added for forwards comapatibility.
You can find RecordBatches in the Arrow spec here[4].
[2]: https://facebook.github.io/zstd/
[3]: https://android.googlesource.com/platform/external/lz4/+/HEAD/doc/lz4_Frame_format.md
[4]: https://arrow.apache.org/docs/format/Columnar.html#recordbatch-messageLink to this section Summary
Functions
Creates a RecordBatch given a list of arrays
Link to this section Types
-type buffer() :: #{offset => non_neg_integer(), length => pos_integer()}.
-type field_node() :: #{length => pos_integer(), null_count => non_neg_integer()}.
Link to this section Functions
-spec from_erlang(Arrays :: [#array{}]) -> RecordBatch :: #record_batch{}.