Variable-length bytes (no guarantee of UTF8-ness)
Boolean as 1 bit, LSB bit-packed ordering
int32_t days or int64_t milliseconds since the UNIX epoch
Precision-and-scale-based decimal type. Storage type depends on the parameters.
Dictionary aka Category type
Fixed-size binary. Each value occupies the same number of bytes
Fixed-size list. Each value occupies the same number of bytes
2, 4, or 8-byte floating point value
Signed or unsigned 8, 16, 32, or 64-bit little-endian integer
YEAR_MONTH or DAY_TIME interval in SQL style
A list of some logical data type
Map of named logical types
The default placeholder type
A NULL type having no physical storage
Struct of logical types
Time as signed 32 or 64-bit integer, representing either seconds, milliseconds, microseconds, or nanoseconds since midnight since midnight
Exact timestamp encoded with int64 since UNIX epoch (Default unit millisecond)
Union of logical types
UTF8 variable-length string as List
Generated using TypeDoc
Main data type enumeration.
Data types in this library are all logical. They can be expressed as either a primitive physical type (bytes or bits of some fixed size), a nested type consisting of other data types, or another data type (e.g. a timestamp encoded as an int64).
Note: Only enum values 0-17 (NONE through Map) are written to an Arrow IPC payload.
The rest of the values are specified here so TypeScript can narrow the type signatures further beyond the base Arrow Types. The Arrow DataTypes include metadata like
bitWidth
that impact the type signatures of the values we accept and return.For example, the
Int8Vector
reads 1-byte numbers from anInt8Array
, anInt32Vector
reads a 4-byte number from anInt32Array
, and anInt64Vector
reads a pair of 4-byte lo, hi 32-bit integers as a zero-copy slice from the underlyingInt32Array
.Library consumers benefit by knowing the narrowest type, since we can ensure the types across all public methods are propagated, and never bail to
any
. These values are never used at runtime, and they will never be written to the flatbuffers metadata of serialized Arrow IPC payloads.