Skip to main content

hash_join

Function hash_join 

Source
pub fn hash_join(
    left_batch: &TermBatch,
    right_batch: &TermBatch,
    left_col_keys: &[usize],
    right_col_keys: &[usize],
    right_carry: &[usize],
    soft_pairs: &[(usize, usize)],
) -> Result<TermBatch, ExecError>
Expand description

Hash-join left with right (TermId keys; kept as a named alias of the production kernel for parity tests).

Production compute uses hash_join_columnar.

  • left_keys / right_keys: column indices forming the equality key (same length; compared via TermId).
  • right_carry: right-side columns appended to the output (typically non-join columns). Left columns are always kept in order.
  • soft_pairs: shared columns that may be unbound on one side; reconciled after hard-key matches (SPARQL compatible mappings).
  • Empty keys → cartesian product (then soft reconcile).

The smaller side is the build side. Output row order follows the probe side.