Vortex uses a unified logical type system calledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vortex-data/vortex/llms.txt
Use this file to discover all available pages before exploring further.
DType throughout the library. DType values are serialized in two different wire formats depending on context: FlatBuffers for the .vortex file format and IPC messages, and Protocol Buffers for expressions, statistics, and other proto-based subsystems.
Type system overview
TheDType union covers eleven variants:
| Variant | FlatBuffers discriminant | Description |
|---|---|---|
Null | 1 | The null type (no values) |
Bool | 2 | Boolean values |
Primitive | 3 | Fixed-width numeric types (see PType) |
Decimal | 4 | Decimal number with precision and scale |
Utf8 | 5 | UTF-8 encoded strings |
Binary | 6 | Arbitrary byte sequences |
Struct_ | 7 | Named, heterogeneous fields |
List | 8 | Variable-length sequences of a single element type |
Extension | 9 | User-defined types with a storage type and opaque metadata |
FixedSizeList | 10 | Fixed-length sequences of a single element type |
Variant | 11 | Semi-structured / schemaless nested values |
FixedSizeList is assigned discriminant 10 (after Extension at 9) to preserve backwards compatibility with files written before FixedSizeList was added.nullable: bool field indicating whether the array may contain null values.
FlatBuffers definition
FlatBuffers serialization is used in.vortex files (the dtype segment) and in IPC DTypeMessage bodies.
Primitive numeric types
ThePType enum covers all fixed-width numeric types supported by Vortex:
PType | Rust equivalent | Width |
|---|---|---|
U8 | u8 | 8-bit unsigned integer |
U16 | u16 | 16-bit unsigned integer |
U32 | u32 | 32-bit unsigned integer |
U64 | u64 | 64-bit unsigned integer |
I8 | i8 | 8-bit signed integer |
I16 | i16 | 16-bit signed integer |
I32 | i32 | 32-bit signed integer |
I64 | i64 | 64-bit signed integer |
F16 | f16 | 16-bit IEEE float |
F32 | f32 | 32-bit IEEE float |
F64 | f64 | 64-bit IEEE float |
Extension type serialization
TheExtension type allows user-defined types to be stored in Vortex files. An extension type carries:
id— a globally unique string identifier for the extension type, resolved against the Vortex registry at read-time.storage_dtype— the underlyingDTypeused to physically store the values.metadata— opaque byte metadata interpreted by the extension type’s implementation.
nullable field directly; nullability is inherited from the storage_dtype.
Struct field paths
Thedtype.proto file also defines Field and FieldPath messages for addressing fields within a struct schema, used in expression serialization:
Protocol Buffers definition
Protocol Buffers serialization is used in expressions (see Scalar Serialization Format) and in other proto-based subsystems. The proto schema mirrors the FlatBuffers schema with minor differences in field numbering and nullability representation.oneof field numbers in the proto definition match the FlatBuffers union discriminant values, making the type system consistent across both serialization formats.
Versioning
The FlatBuffers union discriminant values and protooneof field numbers are fixed and must not be changed. New DType variants are appended at the end of the union with the next available discriminant (currently 12). Existing fields within each variant table may have new optional fields appended, but existing fields must not be removed or renumbered.