Expand description
A serialized data type.
dtype.fbs:
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
enum PType: uint8 {
U8,
U16,
U32,
U64,
I8,
I16,
I32,
I64,
F16,
F32,
F64,
}
table Null {}
table Bool {
nullable: bool;
}
table Primitive {
ptype: PType;
nullable: bool;
}
table Decimal {
precision: uint8;
scale: int8;
nullable: bool;
}
table Utf8 {
nullable: bool;
}
table Binary {
nullable: bool;
}
table Struct_ {
names: [string];
dtypes: [DType];
nullable: bool;
}
table List {
element_type: DType;
nullable: bool;
}
table FixedSizeList {
element_type: DType;
size: uint32;
nullable: bool;
}
table Extension {
id: string;
storage_dtype: DType;
metadata: [ubyte];
}
union Type {
Null = 1,
Bool = 2,
Primitive = 3,
Decimal = 4,
Utf8 = 5,
Binary = 6,
Struct_ = 7,
List = 8,
Extension = 9,
FixedSizeList = 10, // This is after `Extension` for backwards compatibility.
}
table DType {
type: Type;
}
root_type DType;Structs§
- Binary
- Binary
Args - Binary
Builder - Bool
- Bool
Args - Bool
Builder - DType
- DType
Args - DType
Builder - Decimal
- Decimal
Args - Decimal
Builder - Extension
- Extension
Args - Extension
Builder - Fixed
Size List - Fixed
Size List Args - Fixed
Size List Builder - List
- List
Args - List
Builder - Null
- Null
Args - Null
Builder - PType
- Primitive
- Primitive
Args - Primitive
Builder - Struct_
- Struct_
Args - Struct_
Builder - Type
- Type
Union Table Offset - Utf8
- Utf8
Args - Utf8
Builder
Enums§
- Binary
Offset - Bool
Offset - DType
Offset - Decimal
Offset - Extension
Offset - Fixed
Size List Offset - List
Offset - Null
Offset - Primitive
Offset - Struct_
Offset - Utf8
Offset
Constants§
- ENUM_
MAX_ PTYPE Deprecated - ENUM_
MAX_ TYPE Deprecated - ENUM_
MIN_ PTYPE Deprecated - ENUM_
MIN_ TYPE Deprecated - ENUM_
VALUES_ PTYPE Deprecated - ENUM_
VALUES_ TYPE Deprecated
Functions§
- finish_
dtype_ buffer - finish_
size_ prefixed_ dtype_ buffer - root_
as_ dtype - Verifies that a buffer of bytes contains a
DTypeand returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior useroot_as_dtype_unchecked. - root_
as_ ⚠dtype_ unchecked - Assumes, without verification, that a buffer of bytes contains a DType and returns it.
- root_
as_ dtype_ with_ opts - Verifies, with the given options, that a buffer of bytes
contains a
DTypeand returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior useroot_as_dtype_unchecked. - size_
prefixed_ root_ as_ dtype - Verifies that a buffer of bytes contains a size prefixed
DTypeand returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior usesize_prefixed_root_as_dtype_unchecked. - size_
prefixed_ ⚠root_ as_ dtype_ unchecked - Assumes, without verification, that a buffer of bytes contains a size prefixed DType and returns it.
- size_
prefixed_ root_ as_ dtype_ with_ opts - Verifies, with the given verifier options, that a buffer of
bytes contains a size prefixed
DTypeand returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior useroot_as_dtype_unchecked.