Skip to main content

Reducer

Struct Reducer 

Source
pub struct Reducer {
    pub leaves: Vec<Leaf>,
    pub classes: u32,
    pub extremes: Vec<Extreme>,
}
Expand description

The relations of one consistent node and the join tree over them.

Fields§

§leaves: Vec<Leaf>

One per relation, children before parents.

§classes: u32

How many classes of join columns there are, numbered from zero.

§extremes: Vec<Extreme>

One per produced column, in the order the node produces them.

Implementations§

Source§

impl Reducer

Source

pub fn children(&self, leaf: u32) -> impl Iterator<Item = (u32, u32)> + '_

The relations directly under leaf, each with the class it shares with leaf.

Source

pub fn key(&self, leaf: u32, class: u32) -> Option<u32>

The column of leaf that is in class, if it has one.

Source

pub fn wanted(&self, leaf: u32) -> bool

Whether some extreme is read from leaf or from a relation under it.

The second sweep only has to reach the relations an extreme is read from, and a relation with no extreme anywhere under it is one the second sweep can leave alone: nothing that is read later depends on which of its rows survive it.

Source

pub fn held(&self, leaf: u32) -> bool

Whether the rows of leaf have to be held until the second sweep reaches it.

A root is reduced completely by the first sweep alone, since everything in its tree is under it, so its extremes and the keys it hands down are read off its rows as they are scanned. Every other relation the second sweep reaches has to keep its rows until its parent has been reduced, and that is the memory this node spends.

Source

pub fn validate(&self) -> Result<()>

Checks the promises the executor relies on.

A parent after its child, a class that both ends of an edge hold a column of, a class number that is in range and an extreme that names a relation there is. Each of these broken is a sweep that reads the wrong column or waits for a set that is built after it is needed, which is a wrong answer rather than an error, so it is checked where the plan is.

§Errors

Naming the relation that broke one.

Trait Implementations§

Source§

impl Clone for Reducer

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Reducer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Reducer

Source§

impl PartialEq for Reducer

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Reducer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.