pub struct Rids { /* private fields */ }Expand description
A set of row ids of one table of a known number of rows.
Implementations§
Source§impl Rids
impl Rids
Sourcepub fn from_sorted(rows: u64, members: Vec<Rid>) -> Result<Self>
pub fn from_sorted(rows: u64, members: Vec<Rid>) -> Result<Self>
The set holding exactly members, which have to be strictly increasing and below rows.
§Errors
If a member is out of order, repeated or past the end. A set that silently dropped one of those would be a reduction that removed a row which joins.
Sourcepub fn from_words(rows: u64, words: Vec<u64>) -> Result<Self>
pub fn from_words(rows: u64, words: Vec<u64>) -> Result<Self>
The set whose members are the set bits of words, least significant bit of word zero first.
§Errors
If words is not the number of words rows bits take, or a bit past rows is set.
Sourcepub fn any_between(&self, low: Rid, high: Rid) -> bool
pub fn any_between(&self, low: Rid, high: Rid) -> bool
Whether any member is between low and high, both included.
The question a part skip asks: the link’s zone map says the children of this part point at parents in that range, and a range holding no member is a part that cannot contribute.
Sourcepub fn intersect(&self, other: &Self) -> Result<Self>
pub fn intersect(&self, other: &Self) -> Result<Self>
The rows in both sets.
§Errors
If the two are over tables of different sizes, which is two different tables.
Sourcepub fn forward(&self, link: &Link) -> Result<Pushed>
pub fn forward(&self, link: &Link) -> Result<Pushed>
Pushes a set of parent rows forward through link, to the child rows that point into it.
One pass over the link in child order, which is section 4.3’s first push. A part whose zone map says its children point only at parents outside the set is never decoded, which is section 5.5’s part skip and on a child clustered by the parent is most of the table.
§Errors
If this set is not over the link’s parent table.
Sourcepub fn forward_or_stop(&self, link: &Link) -> Result<Pushed>
pub fn forward_or_stop(&self, link: &Link) -> Result<Pushed>
The same push, giving up once it is plain that the set removes nothing.
Section 5.4’s early stop. A push that has covered the first STOP_AFTERth of the child and
kept every row of it stops there and hands back every row, so a reduction that was never
going to remove anything costs a third of a push and then nothing, where finishing would
cost the rest of the push and a bit test per row of the scan. The answer is then a superset
of the children that point into the set, which is all a join that still matches every row
needs, and Pushed::stopped says so.
§Errors
If this set is not over the link’s parent table.
Sourcepub fn backward(&self, link: &Link) -> Result<Self>
pub fn backward(&self, link: &Link) -> Result<Self>
Pushes a set of child rows backward through link, to the parents they point at.
The second push of section 4.3, a pass over the link setting a bit per surviving child. It reads the link in child order just as the forward push does, so it needs no backward structure, and a child without a parent contributes nothing.
§Errors
If this set is not over the link’s child table.