Expand description
Waratah temporal plugin: native temporal literals (already storage terms),
the O-axis dyadic temporal index, SPARQL comparison-FILTER rewrites, and
the tf:* (timefuncs) custom functions.
One crate implements the waratah_compute::plugin hooks — write
(TemporalWritePlugin), plan (TemporalPlannerPlugin), and execute
(TemporalExecutorPlugin) — so ingest and query constants cannot
diverge. No EncodePlugin is registered: temporal terms (xsd:dateTime,
xsd:date, xsd:gYear, xsd:gYearMonth, …) are storage-native already;
the write hook only derives O-axis postings from them.
Register at compute startup via register: the binary composes geo +
temporal onto ONE waratah_compute::PluginHost and installs the
composed set exactly once (PluginHost::install_process_wide) — the
tf:* custom functions (unindexed fallback, ground evaluation) land on
the same process custom-function map BEFORE any query is lowered. The
registries are first-install-wins, so a second self-install is a silent
no-op; install remains only as a single-plugin test shim.
Tier summary (see ARCH.md):
- Tier 0 — comparison rewrite ([
plan]):FILTER(?t >= const)/ range pairs over temporal-typed consts →Join(temporal_scan, inner, ?t). The scan’s partition-side reject is a conservative superset; the executor re-evaluates the stripped comparison exactly (XSD partial order, timezone rules, thegYearfamily extension) so rows are kept exactly as the unindexed FILTER would. - Tier 1 — the index: dyadic postings under the term’s (budgeted)
covering; instants post one exact leaf. Built by
write, served by the partition, trusted from the rebuild epoch (absent = untrusted; the compute auto-rebuild stamps it at startup). - Tier 2 —
tf:*: the timefuncs relations as ground custom functions now; the OWL-Time structure-join rewrite is the follow-on.
Structs§
- Temporal
Executor Plugin - Temporal executor hook.
- Temporal
Planner Plugin - Temporal planner hook.
- Temporal
Scan Payload - Typed payload of the
temporal_scanCustomOp (downcast by the executor). - Temporal
Write Plugin - Temporal write hook.
Constants§
- PLUGIN_
ID - Stable plugin id carried by every CustomOp the temporal plugin mints.
- TEMPORAL_
SCAN_ OP_ ID temporal_scanop id on the CustomOp node.- TF_
NAMESPACE - The
tf:namespace (timefuncs; the local names this crate adds beyond the vocabulary’s eight were placed here with the author’s permission).
Functions§
- eval_
tf_ function - Evaluate one unindexed
tf:*call over RESOLVED terms (ground path). - ingest_
coverer_ config - Coverer configuration for ingest postings and query windows (process
configuration; a change makes existing postings valid-but-looser
supersets — correct, only candidate volume grows — and is made
consistent by
waratah temporal rebuild-index). - install
- Test convenience: install ONLY the temporal plugin +
tf:*custom functions on the process registries (first install wins; one guarded host install per process, so repeat calls are no-ops). Production composes viaregister+ onewaratah_compute::PluginHost::install_process_wide— a second plugin’s self-install would otherwise be a silent no-op. Still BEFORE anyQueryEngineis constructed. - register
- Register the temporal plugin bundle + the
tf:*custom functions onhost(the composition point every plugin crate shares; the binary then installs the composed host exactly once, BEFORE anyQueryEngineis constructed). Duplicate function IRIs propagate to the caller — a conflicting plugin set is a deployment error and must fail at the composition site, not silently no-op at install. - set_
coverer_ config - Override the process coverer config (CLI / compute config / tests).
- tf_
custom_ functions - Register the
tf:*custom functions (unindexed ground fallback).