pub struct Held { /* private fields */ }Expand description
A literal with the one row column a comparison reads it through already built.
The comparison loops read both sides through a slice, so the constant side is turned into a one row column and read at position zero. That column is what carries a string’s four byte prefix, which is the thing the string comparison resolves almost every row from, and building it costs a couple of allocations. Doing that once for the query rather than once per chunk is what this is.
It matters least where a chunk is full and most where it is not. A second conjunct handed the eleven rows the first one kept pays the same setup as one handed two thousand, so on a selective filter the setup was a real part of the call rather than a rounding error on it.
It is also where the memos live for a comparison against a dictionary, which is the other thing
that only works if it is built once for the query. The peel module has what those are and why
they belong to one comparison node rather than to the kernel.
Implementations§
Source§impl Held
impl Held
Sourcepub fn of(ty: &LogicalType, value: &Value) -> Option<Self>
pub fn of(ty: &LogicalType, value: &Value) -> Option<Self>
The one row column for value read as ty, or None for a type with no column layout.
A nested type answers None and the comparison does what it always did, which is decide per
chunk and fall through to the row at a time path if it has to.