Skip to main content

Crate waratah_exec

Crate waratah_exec 

Source
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§

DistinctState
Streaming distinct over TermBatch frames.
JoinBuild
Right-side hash table for a capped inner join.
JoinCursor
Resume point while probing the left batch against a right-side hash table.
SemiJoinSet
Distinct bound key set for EXISTS / NOT EXISTS semi-join.
TermBatch
Columnar batch: each column is one bound variable.
TermColumn
One variable’s column: packed TermIds (0 = unbound).
TermDict
Bidirectional intern table for one SPARQL query.
TermId
Dense intern id for one RDF term in a query.

Enums§

ExecError
Failure in a vectorized kernel.
JoinTableMode
Which backing layout hash_join_build_with constructs, selected process-wide by WARATAH_JOIN_TABLE=map|csr (default csr since the A/B concluded; map remains selectable for bisects and layout A/Bs). The switch governs only the threaded/emission-bounded JoinBuild path; hash_join_columnar’s per-call internal maps and the shuffle kernel’s per-bucket maps are out of scope.
LeftJoinProbeDecision
Encoded LeftJoin probe outcome for one (left, right) candidate.
LeftJoinProbeMark
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 true interned at TermId::COUNTED_PRESENCE in every query dict.
gather_left_join_indices_columnar
Gather LeftJoin output from Diff-once index lists.
hash_join
Hash-join left with right (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 from WARATAH_JOIN_TABLE (default csr; see JoinTableMode).
hash_join_build_with
hash_join_build with 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, u32 gather indexes.
hash_join_columnar_capped
Inner join that probes the left against a pre-built right HT, emitting at most max_out rows starting at cursor.
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_indices None = unbound miss).
parse_join_table_mode
Parse a WARATAH_JOIN_TABLE value: map or csr, case-insensitive, surrounding whitespace tolerated. None for anything else.
shuffle_hash_join
Hash-partition both sides by join-key TermId, then vectorized-join each partition (Phase 9b shuffle).

Type Aliases§

LeftJoinIndexLists
Diff-once LeftJoin index lists: left rows, nullable right rows, early marks.
LeftJoinProbeFilter
Optional LeftJoin probe predicate: (left_row, right_row) → decision.