pub struct SlotIntersect<L: PipelineOperator, R: PipelineOperator> { /* private fields */ }Expand description
Intersects two slot-column pipeline streams on a shared key column.
Used for mutual-neighbor queries of the form:
MATCH (a)-[:R]->(x)<-[:R]-(b)Both left and right streams are consumed eagerly to build an in-memory
slot set from the right (build) side, then the left (probe) stream is
scanned for slots present in the build set. Only slots that appear in both
streams are emitted.
§Output Order
Output slots are emitted in ascending sorted order — the spec mandates deterministic output for the mutual-neighbors fast-path.
§Path Multiplicity
The spec (§6.2) requires path multiplicity to be preserved. For the
mutual-neighbors use case each shared slot represents a distinct path
a → x ← b, so each occurrence in the probe stream maps to exactly one
output slot. The current implementation deduplicates by design (one common
neighbor per pair), which is correct for the targeted query shape.
§Spill
For large build-side sets (above spill_threshold entries), the caller
should use join_spill.rs instead. The current implementation holds the
build side in a std::collections::HashSet pre-sized to the expected
right-side cardinality.
Implementations§
Source§impl<L: PipelineOperator, R: PipelineOperator> SlotIntersect<L, R>
impl<L: PipelineOperator, R: PipelineOperator> SlotIntersect<L, R>
Sourcepub fn new(
left: L,
right: R,
left_key_col: u32,
right_key_col: u32,
spill_threshold: usize,
) -> Self
pub fn new( left: L, right: R, left_key_col: u32, right_key_col: u32, spill_threshold: usize, ) -> Self
Create a SlotIntersect operator.
left— probe side: iterated after the build set is materialised.right— build side: fully consumed into aHashSet<u64>before probing.left_key_col— column ID in the left stream that holds the join key.right_key_col— column ID in the right stream that holds the join key.spill_threshold— log a warning when build side exceeds this many entries.
Trait Implementations§
Source§impl<L: PipelineOperator, R: PipelineOperator> PipelineOperator for SlotIntersect<L, R>
impl<L: PipelineOperator, R: PipelineOperator> PipelineOperator for SlotIntersect<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for SlotIntersect<L, R>
impl<L, R> RefUnwindSafe for SlotIntersect<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for SlotIntersect<L, R>
impl<L, R> Sync for SlotIntersect<L, R>
impl<L, R> Unpin for SlotIntersect<L, R>
impl<L, R> UnsafeUnpin for SlotIntersect<L, R>where
L: UnsafeUnpin,
R: UnsafeUnpin,
impl<L, R> UnwindSafe for SlotIntersect<L, R>where
L: UnwindSafe,
R: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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