Datum
struct DatumOne primitive Iceberg value, tagged with its type.
Implements Copyable, Movable, Writable
- Fields
kind: UInt8i: Int64f: Float64s: Stringb: List[UInt8]precision: Intscale: Intlength: Intvalid: Bool: False for "no value" — an absent bound, a null partition value.
none
def none() -> Self bool_
def bool_(v: Bool) -> Self int_
def int_(v: Int64) -> Self long_
def long_(v: Int64) -> Self integral
def integral(kind: UInt8, v: Int64) -> Self int/long/date/time/timestamp[_ns][tz] — all carried as Int64.
float_
def float_(v: Float64) -> Self double_
def double_(v: Float64) -> Self string_
def string_(var v: String) -> Self binary_
def binary_(var v: List[UInt8]) -> Self fixed_
def fixed_(var v: List[UInt8]) -> Self uuid_
def uuid_(var v: List[UInt8]) -> Self decimal_
def decimal_(var unscaled_be: List[UInt8], precision: Int, scale: Int) -> Self decimal_int
def decimal_int(unscaled: Int64, precision: Int, scale: Int) -> Self is_nan
def is_nan(self) -> Bool write_to
def write_to(self, mut writer: T) repr_
def repr_(self) -> String to_json
def to_json(self) -> String Appendix D, JSON half.
encode
def encode(self, mut out: List[UInt8]) Appends this value in iceberg's wire form (iceberg.wire): every field, in declaration order, so a value decodes to exactly itself, including a NaN's payload and an invalid value's leftovers.
decode
def decode(buf: Span[UInt8], mut pos: Int) -> Self Reads what encode wrote at buf[pos] and advances pos.