View Source arrow_fixed_list_array (arrow v0.1.0)
Provides support for Arrow's Fixed-Size List Layout.
This module provides support for the Fixed-Size List Layout[1], which is an layout that supports storing a list of lists of a specific length and nesting.
invalid-input
Invalid Input
It is important that care is taken when passing input values to this module. For performance reasons, the input is not validated. The function crashes on nesting that is inconsitent: a. with the type, b. between elements. The lists are checked to have the same length as each other at the top level, but not for deeper levels. The behaviour of the module on invalid input CANNOT BE GUARANTEED. Therefore, one must be careful to not to CRASH THE PROCESS or worse still, PRODUCE INVALID OUTPUT.
Any input must follow the following rules:
- The length of each element must be consistent with the type
- The nesting of each element must be consistent with the type
- The length of each element must be consistent with each other
- The nesting of each element must be consistent with each other
- The nested type is a
fixed_list(as only then can fixed size be guaranteed)
Link to this section Summary
Functions
Creates a Fixed-Size List Array given the values and type.
Link to this section Functions
-spec from_erlang(Values :: list(), Type :: map() | arrow_type:arrow_type()) -> Array :: #array{}.
Creates a Fixed-Size List Array given the values and type.
Accepts a map with the type, or the type directly.