Module dtype

Module dtype 

Source
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
BinaryArgs
BinaryBuilder
Bool
BoolArgs
BoolBuilder
DType
DTypeArgs
DTypeBuilder
Decimal
DecimalArgs
DecimalBuilder
Extension
ExtensionArgs
ExtensionBuilder
FixedSizeList
FixedSizeListArgs
FixedSizeListBuilder
List
ListArgs
ListBuilder
Null
NullArgs
NullBuilder
PType
Primitive
PrimitiveArgs
PrimitiveBuilder
Struct_
Struct_Args
Struct_Builder
Type
TypeUnionTableOffset
Utf8
Utf8Args
Utf8Builder

Enums§

BinaryOffset
BoolOffset
DTypeOffset
DecimalOffset
ExtensionOffset
FixedSizeListOffset
ListOffset
NullOffset
PrimitiveOffset
Struct_Offset
Utf8Offset

Constants§

ENUM_MAX_PTYPEDeprecated
ENUM_MAX_TYPEDeprecated
ENUM_MIN_PTYPEDeprecated
ENUM_MIN_TYPEDeprecated
ENUM_VALUES_PTYPEDeprecated
ENUM_VALUES_TYPEDeprecated

Functions§

finish_dtype_buffer
finish_size_prefixed_dtype_buffer
root_as_dtype
Verifies that a buffer of bytes contains a DType and returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior use root_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 DType and returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior use root_as_dtype_unchecked.
size_prefixed_root_as_dtype
Verifies that a buffer of bytes contains a size prefixed DType and returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior use size_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 DType and returns it. Note that verification is still experimental and may not catch every error, or be maximally performant. For the previous, unchecked, behavior use root_as_dtype_unchecked.