pub struct FlippedJoin {
pub parent: NodeId,
pub child: NodeId,
pub parent_key: Vec<ColId>,
pub child_key: Vec<ColId>,
pub rel_slot: RelId,
pub chunk_size: usize,
pub output: Cell<Option<OutEdge>>,
/* private fields */
}Expand description
FlippedJoin: child-driven inner join (spec 06 §3.2). Two input ports
(Port::JoinParent/Port::JoinChild) like Join;
the child drives the fetch but the parent is the output row, so
rel_slot resolves against the parent schema and input_schema is the parent’s.
Fields§
§parent: NodeIdThe output side (parent rows). The attached relationship hangs here.
child: NodeIdThe driving side: children are fetched first and grouped by join key.
parent_key: Vec<ColId>§child_key: Vec<ColId>§rel_slot: RelIdRelationship slot (resolved from the alias against the parent schema at
build time, like Join).
chunk_size: usizeIN-batch chunking threshold (test/seam; default DEFAULT_CHUNK_SIZE). A
batch above this needs the node-level merge (deferred — see module docs).
output: Cell<Option<OutEdge>>The single downstream edge as a port-carrying OutEdge (like
Join): Port::Single to a terminal sink, or a join
port when this flipped join feeds another join.
Implementations§
Source§impl FlippedJoin
impl FlippedJoin
pub fn new( parent: NodeId, child: NodeId, parent_key: Vec<ColId>, child_key: Vec<ColId>, rel_slot: RelId, ) -> FlippedJoin
Sourcepub fn with_chunk_size(self, chunk_size: usize) -> FlippedJoin
pub fn with_chunk_size(self, chunk_size: usize) -> FlippedJoin
Override the IN-batch chunk size (the setMultiConstraintChunkSizeForTest
seam, flipped-join.ts:57). Used by the chunking-equivalence test once the
chunked fetch path lands.
Sourcepub fn fetch<'g>(
&'g self,
g: &'g Graph,
req: &FetchRequest,
) -> Box<dyn Iterator<Item = Node<'g>> + 'g>
pub fn fetch<'g>( &'g self, g: &'g Graph, req: &FetchRequest, ) -> Box<dyn Iterator<Item = Node<'g>> + 'g>
Lazy pull (flipped-join.ts:161): translate the request constraint onto the
child key, fetch all children, then fetch_batched.