View Source arrow_ipc_field (arrow v0.1.0)

Provides a record and functions to deal with individual fields in a Schema

A Field[1] represents a single column in a table (which is represented by a Schema[2]). This module provides a record and a function to manage all the metadata required to represent a column. Metadata such as:

  1. name: The Name of the column. This can either be a string or null.
  2. nullable: A boolean representing whether a column can have null values. Generally true.
  3. type: The Type of the column, and is of type arrow_ipc_type:ipc_type()
  4. dictionary: A boolean representing if the column is dictionary encoded
  5. children: The child fields of a nested datatype
  6. custom_metadata: A list of custom metadata in key-value format

Currently, dictionary encoding and custom metadata are not supported, but they have been added for forwards comapatibility.

[1]: https://github.com/apache/arrow/blob/3456131ab7350bee5d9569ffd63d3f0ee713991c/format/Schema.fbs#L469-L492

[2]: https://github.com/apache/arrow/blob/3456131ab7350bee5d9569ffd63d3f0ee713991c/format/Schema.fbs#L514-L530

Link to this section Summary

Functions

Creates a field given the type of the column. Assigns the name as undefined.
Creates a field given the type and name of the column.
Creates a field given the type, name and children of the column.

Link to this section Functions

-spec from_erlang(Type :: arrow_ipc_type:ipc_type()) -> Field :: #field{}.
Creates a field given the type of the column. Assigns the name as undefined.
-spec from_erlang(Type :: arrow_ipc_type:ipc_type(), Name :: string() | undefined) -> Field :: #field{}.
Creates a field given the type and name of the column.
Link to this function

from_erlang(Type, Name, Children)

View Source
-spec from_erlang(Type :: arrow_ipc_type:ipc_type(),
            Name :: string() | undefined,
            Children :: [#field{}]) ->
               Field :: #field{}.
Creates a field given the type, name and children of the column.