Iceberg types are recursive (a struct holds fields whose types may be structs).
Mojo has no easy recursive value type, so a whole type tree lives in a
TypeStore arena: every node is an entry in TypeStore.nodes and children are
referred to by Int index. A "type" in this module is therefore always a
(store, index) pair; TypeStore owns the memory.
All primitives from format versions 1, 2 and 3 are covered, including the v3
additions unknown, timestamp_ns, timestamptz_ns, variant,
geometry(C) and geography(C, A). A primitive the reader does not recognise
is kept as UNKNOWN_PRIM with its original spelling in TypeNode.raw, so
forward-compatible metadata (the spec requires readers to tolerate it) still
parses instead of blowing up.
Aliases
comptime TK_PRIMITIVE = UInt8(0)
comptime TK_STRUCT = UInt8(1)
comptime TK_LIST = UInt8(2)
comptime TK_MAP = UInt8(3)
comptime P_BOOLEAN = UInt8(0)
comptime P_INT = UInt8(1)
comptime P_LONG = UInt8(2)
comptime P_FLOAT = UInt8(3)
comptime P_DOUBLE = UInt8(4)
comptime P_DATE = UInt8(5)
comptime P_TIME = UInt8(6)
comptime P_TIMESTAMP = UInt8(7)
comptime P_TIMESTAMPTZ = UInt8(8)
comptime P_TIMESTAMP_NS = UInt8(9)
comptime P_TIMESTAMPTZ_NS = UInt8(10)
comptime P_STRING = UInt8(11)
comptime P_UUID = UInt8(12)
comptime P_FIXED = UInt8(13)
comptime P_BINARY = UInt8(14)
comptime P_DECIMAL = UInt8(15)
comptime P_UNKNOWN = UInt8(16)
comptime P_VARIANT = UInt8(17)
comptime P_GEOMETRY = UInt8(18)
comptime P_GEOGRAPHY = UInt8(19)
comptime P_UNRECOGNIZED = UInt8(255)
A primitive spelling this build does not know — kept verbatim, never fatal.
comptime DEFAULT_CRS = String("OGC:CRS84")
comptime DEFAULT_EDGE_ALGORITHM = String("spherical")