pub struct PermutationsSignal {
pub count: u8,
pub names: Vec<String>,
pub merge_join: bool,
}Expand description
The file’s index permutation set: how many orders of (s, p, o) it
stores, and therefore whether its planner can run a sort-merge join.
rete build --permutations 3 writes SPO, POS and OSP only. Those three tie
the longest bound prefix on all eight triple-pattern shapes, so the file
answers every query with the same rows, routed to the same tiles — the
difference is invisible from the results, exactly like a missing
full-text index (#189). What it gives up is the merge join: SOP/PSO/OPS
exist only to hand a join two streams already sorted on the join key, and
they are typically ~40% of a built file. A consumer choosing between two
mirrors of one dataset, or deciding whether a join-heavy workload will hold
up, has to be able to see which it has.
Measured at read time, never stored, for the reasons TextIndexSignal
spells out and one more that is specific to this signal: which permutations
a file carries is a fact about its bytes. A stored copy would be an
authored claim about the file’s own layout — the one class of statement the
file can always check for itself, in the 1 KiB header every card read has
already fetched. This costs no extra read at all.
Fields§
§count: u8How many permutations are stored: 3 or 6 today.
names: Vec<String>Their names in section order, e.g. ["SPO", "POS", "OSP"]. Written out
rather than implied by count, because the mask is a set and a future
build may keep a different three.
merge_join: boolWhether the file carries the merge-join orders (SOP, PSO, OPS) — i.e. whether a two-pattern join sharing a same-role variable can be answered by a linear two-pointer merge instead of a hash join.
Implementations§
Source§impl PermutationsSignal
impl PermutationsSignal
Sourcepub fn probe(header: &Header) -> PermutationsSignal
pub fn probe(header: &Header) -> PermutationsSignal
Read it straight off the parsed header — the mask is one byte at [50],
and 0 there means all six (every file written before the mask
existed). No range read of any kind.
Trait Implementations§
Source§impl Clone for PermutationsSignal
impl Clone for PermutationsSignal
Source§fn clone(&self) -> PermutationsSignal
fn clone(&self) -> PermutationsSignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more