Query path
From SPARQL to matching quads, on ids
For a pattern (g, s, p, ?):
- Locate ids in the dictionaries (binary search, FCD-decoded)
- Pick the index:
sbound? GSPO : GPOS (onlyobound: one GPOS probe per predicate of the graph) - Level 1:
select1(Bs, g)delimits g’s subjects; binary-search s - Level 2:
select1(Bp, ...)delimits (g,s)’s predicates; binary-search p - Level 3:
select1(Bo, ...)delimits (g,s,p)’s objects; stream them extract(id)turns an id back into a term only where a row needs one (the node table: pages of 16 consecutive ids for id → term, a Caffeine cache for term → id)
- Rows stay ids.
OpExecutorBGtakes over basic graph patterns, bare or underFILTER: it reorders them by the VoID statistics (a fixed heuristic without them), places the filters, and joins on ids. Range filters are pushed into the runs as id bounds, widened to whole value-equal clusters (ValueCluster) GRAPH ?g { ... }over patterns,FILTER,OPTIONALandUNIONis one walk over the named graphs on ids (GraphVarBG), handed to parallel workers once it has produced 65,536 rows; other blocks run graph by graph through Jena’s operator- Aggregates on ids.
COUNTs of every quad — whole, or by graph or predicate — andDISTINCT ?p/?sare read off the index levels; any otherGROUP BY,COUNT,SUM,AVG,MINorMAXover patterns the engine reads is computed on ids by the threads that read the rows (GroupOnIds) - Parallel scans. A scan-shaped first pattern (
?s ?p ?o,?s <p> ?o) of at least 65,536 positions is cut into position chunks read on virtual threads (ScanChunks,ParallelScan); a store read over HTTP is read on one thread - Every step is a handful of range reads over packed arrays — ideal for memory maps and HTTP range requests alike
- RDF 1.2 triple-term patterns with variables are unified on ids against
tripleTerms(TripleTermMatcher) - Optional spatial layer: geometries are Hilbert-indexed into cell ids stored as ordinary quads in graph
urn:x-beakgraph:Spatial;geof:sfIntersectstakes its candidates from GPOS range scans over the query region’s cover and verifies each with JTS, so results are exact
← Previous: Integer sequences Next: Six writers, one format →