Errow - Zero-copy, Apache Arrow-compliant packed arrays for Elixir and the BEAM.
Errow provides columnar in-memory arrays backed by continuous BEAM binaries,
fully integrated with standard Elixir protocols (Enumerable, Collectable, Access),
and 100% byte-for-byte compliant with the Apache Arrow Columnar Specification and
Arrow C Data Interface.
Modules
Errow.String: UTF-8 variable-length string arrays (ArrowUtf8/ VARCHAR).Errow.Binary: Opaque raw byte blob arrays (ArrowBinary/ BLOB).Errow.Numeric: Fixed-width primitive arrays (:s8..:s256,:u8..:u256,:f32,:f64).Errow.CData: Exporters for Arrow C Data Interface (ArrowArray/ArrowSchemametadata and buffers).
Quick Examples
Strings & Comprehensions (Collectable + Enumerable)
iex> arr = for name <- ["Elixir", "Arrow", "BEAM"], into: Errow.string() do
...> String.upcase(name)
...> end
iex> arr[0]
"ELIXIR"
iex> arr[-1]
"BEAM"
iex> arr[0..1]
["ELIXIR", "ARROW"]Numerics with 128-bit / 256-bit BigInt Support
iex> num = Errow.numeric([10, 20, 30], :s32)
iex> Enum.sum(num)
60
iex> put_in(num[1], 99)[1]
99Zero-Copy Arrow Export
iex> arr = Errow.string(["Elixir", "Arrow"])
iex> schema = Errow.CData.export_schema(arr)
iex> schema.format
"u"
iex> %{buffers: [_validity, _offsets, _data]} = Errow.CData.export_buffers(arr)
Summary
Functions
Creates a new empty Errow.Binary array.
Builds an Errow.Binary array from an enumerable.
Creates a 32-bit float array (:f32).
Creates a 64-bit float array (:f64).
Joins string elements with the given separator.
Returns the maximum value in a numeric or string array.
Calculates the arithmetic mean of elements in a numeric array.
Returns the minimum value in a numeric or string array.
Returns {min, max} in a single pass.
Creates a new empty Errow.Numeric array of the given type (default :s64).
Builds an Errow.Numeric array from an enumerable of numbers and optional nils.
Creates an 8-bit integer array (:s8 by default, or :u8).
Usable directly in comprehensions: into: Errow.numeric_8 or into: Errow.numeric_8()
Calculates the product of elements in a numeric array.
Creates an empty signed 8-bit integer array (:s8).
Usable directly in comprehensions: into: Errow.s8 or into: Errow.s8().
Creates a signed 16-bit integer array (:s16).
Creates a signed 32-bit integer array (:s32).
Creates a signed 64-bit integer array (:s64).
Creates a signed 128-bit integer array (:s128).
Creates a signed 256-bit integer array (:s256).
Creates a new empty Errow.String array.
Builds an Errow.String array from an enumerable.
Calculates the sum of elements in a numeric array.
Creates an empty unsigned 8-bit integer array (:u8).
Usable directly in comprehensions: into: Errow.u8 or into: Errow.u8().
Creates an unsigned 16-bit integer array (:u16).
Creates an unsigned 32-bit integer array (:u32).
Creates an unsigned 64-bit integer array (:u64).
Creates an unsigned 128-bit integer array (:u128).
Creates an unsigned 256-bit integer array (:u256).
Functions
Creates a new empty Errow.Binary array.
Builds an Errow.Binary array from an enumerable.
Creates a 32-bit float array (:f32).
Creates a 64-bit float array (:f64).
Joins string elements with the given separator.
Returns the maximum value in a numeric or string array.
Calculates the arithmetic mean of elements in a numeric array.
Returns the minimum value in a numeric or string array.
Returns {min, max} in a single pass.
Creates a new empty Errow.Numeric array of the given type (default :s64).
Builds an Errow.Numeric array from an enumerable of numbers and optional nils.
Creates an 8-bit integer array (:s8 by default, or :u8).
Usable directly in comprehensions: into: Errow.numeric_8 or into: Errow.numeric_8()
Calculates the product of elements in a numeric array.
Creates an empty signed 8-bit integer array (:s8).
Usable directly in comprehensions: into: Errow.s8 or into: Errow.s8().
Creates a signed 16-bit integer array (:s16).
Creates a signed 32-bit integer array (:s32).
Creates a signed 64-bit integer array (:s64).
Creates a signed 128-bit integer array (:s128).
Creates a signed 256-bit integer array (:s256).
Creates a new empty Errow.String array.
Builds an Errow.String array from an enumerable.
Calculates the sum of elements in a numeric array.
Creates an empty unsigned 8-bit integer array (:u8).
Usable directly in comprehensions: into: Errow.u8 or into: Errow.u8().
Creates an unsigned 16-bit integer array (:u16).
Creates an unsigned 32-bit integer array (:u32).
Creates an unsigned 64-bit integer array (:u64).
Creates an unsigned 128-bit integer array (:u128).
Creates an unsigned 256-bit integer array (:u256).