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§
Trait Implementations§
Source§impl Clone for PermutationsSignal
impl Clone for PermutationsSignal
Source§impl Debug for PermutationsSignal
impl Debug for PermutationsSignal
Source§impl<'de> Deserialize<'de> for PermutationsSignal
impl<'de> Deserialize<'de> for PermutationsSignal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PermutationsSignal
Source§impl PartialEq for PermutationsSignal
impl PartialEq for PermutationsSignal
Source§impl Serialize for PermutationsSignal
impl Serialize for PermutationsSignal
impl StructuralPartialEq for PermutationsSignal
Auto Trait Implementations§
impl Freeze for PermutationsSignal
impl RefUnwindSafe for PermutationsSignal
impl Send for PermutationsSignal
impl Sync for PermutationsSignal
impl Unpin for PermutationsSignal
impl UnsafeUnpin for PermutationsSignal
impl UnwindSafe for PermutationsSignal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more