Expand description
Vectorized execution kernels for Waratah compute (Phase 9a–9c).
Phase 9a provides columnar TermColumn frames of query-local
TermIds (Vec<u32>; 0 = SPARQL unbound). Production joins use
hash_join_columnar; scalar hash_join is the same TermId kernel
kept for parity tests. Bound vs unbound is id != 0. DistinctState
deduplicates solution rows on those ids.
Phase 9b adds shuffle_hash_join (hash-partition then per-bucket
TermId join). Broadcast filtering is applied at the storage scan
boundary. Phase 9c adds left_hash_join_columnar for SPARQL
OPTIONAL, with scalar left_hash_join as an alias.
Join semantics: equality on TermIds for hard keys, soft shared columns reconciled after candidate generation (SPARQL compatible mappings), unbound hard keys never match, smaller side as build (inner join), empty key list = cartesian. Left join always builds on the right.
Structs§
- Distinct
State - Streaming distinct over
TermBatchframes. - Join
Build - Right-side hash table for a capped inner join.
- Join
Cursor - Resume point while probing the left batch against a right-side hash table.
- Semi
Join Set - Distinct bound key set for EXISTS / NOT EXISTS semi-join.
- Term
Batch - Columnar batch: each column is one bound variable.
- Term
Column - One variable’s column: packed TermIds (
0= unbound). - Term
Dict - Bidirectional intern table for one SPARQL query.
- TermId
- Dense intern id for one RDF term in a query.
Enums§
- Exec
Error - Failure in a vectorized kernel.
- Join
Table Mode - Which backing layout
hash_join_build_withconstructs, selected process-wide byWARATAH_JOIN_TABLE=map|csr(defaultcsrsince the A/B concluded;mapremains selectable for bisects and layout A/Bs). The switch governs only the threaded/emission-boundedJoinBuildpath;hash_join_columnar’s per-call internal maps and the shuffle kernel’s per-bucket maps are out of scope. - Left
Join Probe Decision - Encoded LeftJoin probe outcome for one (left, right) candidate.
- Left
Join Probe Mark - Per emitted index-list entry from a Diff-once LeftJoin probe.
Constants§
- DEFAULT_
SHUFFLE_ PARTITIONS - Default partition count for
shuffle_hash_join.
Functions§
- counted_
presence_ encoded_ term - XSD
trueinterned atTermId::COUNTED_PRESENCEin every query dict. - gather_
left_ join_ indices_ columnar - Gather LeftJoin output from Diff-once index lists.
- hash_
join - Hash-join
leftwithright(TermId keys; kept as a named alias of the production kernel for parity tests). - hash_
join_ build - Build a right-side hash table for
hash_join_columnar_capped, using the process-wide layout fromWARATAH_JOIN_TABLE(defaultcsr; seeJoinTableMode). - hash_
join_ build_ with hash_join_buildwith an explicit layout — the deterministic entry point for A/B tests; production goes through the env-var default.- hash_
join_ columnar - Columnar hash-join: TermId equality,
u32gather indexes. - hash_
join_ columnar_ capped - Inner join that probes the left against a pre-built right HT, emitting at
most
max_outrows starting atcursor. - key1
- 1-column key: the TermId (0 = unbound).
- key2
- 2-column packed key.
- key3
- 3-column packed key.
- key4
- 4-column packed key.
- key5
- 5-column packed key.
- key6
- 6-column packed key.
- key7
- 7-column packed key.
- key_
wide - Mix 8+ Distinct columns to an owned id tuple.
- left_
hash_ join - Left outer hash join: every left row is kept; unmatched right columns are unbound.
- left_
hash_ join_ columnar - Columnar left outer hash join: same semantics as
left_hash_join. - left_
hash_ join_ columnar_ indices - Diff-once LeftJoin index lists (
right_indicesNone= unbound miss). - parse_
join_ table_ mode - Parse a
WARATAH_JOIN_TABLEvalue:maporcsr, case-insensitive, surrounding whitespace tolerated.Nonefor anything else. - shuffle_
hash_ join - Hash-partition both sides by join-key TermId, then vectorized-join each partition (Phase 9b shuffle).
Type Aliases§
- Left
Join Index Lists - Diff-once LeftJoin index lists: left rows, nullable right rows, early marks.
- Left
Join Probe Filter - Optional LeftJoin probe predicate:
(left_row, right_row) → decision.