Enum CanonVal
pub enum CanonVal {
Absent,
Null,
Bool(bool),
Int(i64),
Float(u64),
Str(Arc<str>),
Json(Arc<str>),
}Expand description
One column of a CanonKey — a type-tagged, Hash + Eq value. The tag is the
variant itself, so Int(1) and Str("1") are distinct keys (the JS prefixes a type
char; the Rust enum carries the type for free).
Variants§
Absent
Mirrors OwnedValue::Absent — never met on a join key in practice
(presence-required, PROJECTION-SUPPORT-DESIGN.md §2.1), carried for totality.
Null
Bool(bool)
Int(i64)
Float(u64)
A float outside the Int class, keyed by its bits (total_cmp identity).
Str(Arc<str>)
Json(Arc<str>)
Implementations§
§impl CanonVal
impl CanonVal
pub fn of(v: &OwnedValue) -> CanonVal
pub fn of(v: &OwnedValue) -> CanonVal
The canonical class of an owned cell.
pub fn of_value(v: Value<'_>) -> CanonVal
pub fn of_value(v: Value<'_>) -> CanonVal
Borrowed-cell form of CanonVal::of (a flat row’s cells are Value<'_>s).
Str/Json allocate — the key escapes the row.
pub fn to_owned_value(&self) -> OwnedValue
pub fn to_owned_value(&self) -> OwnedValue
The inverse of CanonVal::of up to equivalence: an OwnedValue in this
value’s class — Int(i) for a folded integral float (the canonical
representative), the exact bits for any other float.
A per-partition hydrate (design 310 §4.4) is a fetch constrained on the
partition columns, and a fetch constraint is a (ColId, OwnedValue) pair
matched with values_equal — so constraining on
the canonical Int(5) finds a Float(5.0) cell on both leaves, for the same
reason join constraints already do.