pub enum VecEncoding {
F32,
Sq8,
F16,
}Expand description
In-cell encoding for DataType::Vector. Mirrors
spg_sql::ast::VecEncoding — kept here so storage stays
dep-free of spg-sql. The engine bridges between the two
at DDL-execution time.
F32 is the pre-v6 default: each cell holds a raw Vec<f32>.
Sq8 (v6.0.1) stores Sq8Vector { min, max, bytes: Vec<u8> }
per cell; 4× compression vs F32 with recall@10 ≥ 0.95 on
natural embeddings (Gaussian / unit-sphere corpora).
F16 (v6.0.3, DDL keyword HALF) stores each element as
IEEE-754 binary16; 2× compression and bit-exact dequantise.
Variants§
Trait Implementations§
Source§impl Clone for VecEncoding
impl Clone for VecEncoding
Source§fn clone(&self) -> VecEncoding
fn clone(&self) -> VecEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VecEncoding
Source§impl Debug for VecEncoding
impl Debug for VecEncoding
Source§impl Default for VecEncoding
impl Default for VecEncoding
Source§fn default() -> VecEncoding
fn default() -> VecEncoding
Returns the “default value” for a type. Read more
Source§impl Display for VecEncoding
impl Display for VecEncoding
impl Eq for VecEncoding
Source§impl PartialEq for VecEncoding
impl PartialEq for VecEncoding
Source§fn eq(&self, other: &VecEncoding) -> bool
fn eq(&self, other: &VecEncoding) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VecEncoding
Auto Trait Implementations§
impl Freeze for VecEncoding
impl RefUnwindSafe for VecEncoding
impl Send for VecEncoding
impl Sync for VecEncoding
impl Unpin for VecEncoding
impl UnsafeUnpin for VecEncoding
impl UnwindSafe for VecEncoding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more