Skip to main content

hash_join_columnar_capped

Function hash_join_columnar_capped 

Source
pub fn hash_join_columnar_capped(
    left_batch: &TermBatch,
    right_batch: &TermBatch,
    left_col_keys: &[usize],
    right_col_keys: &[usize],
    right_carry: &[usize],
    soft_pairs: &[(usize, usize)],
    max_out: usize,
    cursor: JoinCursor,
    build: &JoinBuild,
) -> Result<(TermBatch, Option<JoinCursor>), ExecError>
Expand description

Inner join that probes the left against a pre-built right HT, emitting at most max_out rows starting at cursor.

Returns the output page and the next cursor (None = this left×right pair is exhausted). Peak index-list length is max_out (or max_out plus the rest of the current bucket if a soft-incompatible pair is skipped inside the gather cap — we skip those without counting).

Unlike hash_join_columnar, this does not pick the smaller side as build: demand-driven joins keep a stable left-row cursor. right_batch is still required for gather and soft-pair checks; the map only stores right row ids.