View Source arrow_fixed_primitive_array (arrow v0.1.0)

Provides support for Arrow's Fixed-Size Primitive Layout.

The Primitive Layout[1] uses the following metadata in the arrow_array:

  1. layout, of type atom(), and a constant value of fixed_primitive.
  2. type, of type arrow_type:arrow_primitive_type(), which represents the Logical Type of the Array.
  3. len, of type pos_integer(), which represents the Array's Length.
  4. null_count, of type non_neg_integer(), which represents the Array's Null Count, or the number of undefined values in the Array.
  5. validity_bitmap, which is a buffer (arrow_buffer) or the atom undefined, which represents the Array's Validity Bitmap[2].
  6. data, which is a buffer (arrow_buffer), which represents the Array's Value Buffer.

The offsets field will be allocated as undefined. Same goes for the validity_bitmap field in the case of a 0 null_count.

[1]: https://arrow.apache.org/docs/format/Columnar.html#fixed-size-primitive-layout

[2]: https://arrow.apache.org/docs/format/Columnar.html#validity-bitmaps

Link to this section Summary

Functions

Creates a new primitive array, given its value and type from its erlang representation.

Link to this section Functions

Link to this function

from_erlang(Value, Type)

View Source
-spec from_erlang(Value :: [arrow_type:native_type()],
            Type :: map() | arrow_type:arrow_primitive_type()) ->
               Array :: #array{}.

Creates a new primitive array, given its value and type from its erlang representation.

Accepts a map with the type, or the type directly.