Expand description
The computed entity-graph tables greptime_private.semantic_entities and
greptime_private.semantic_relationships.
They live in greptime_private, not information_schema: scanning them
triggers read-time derivation over telemetry tables (trace self-joins, …),
which breaks the “cheap, metadata-only” expectation users have of
information_schema. greptime_private also hosts the physical
declared-edge table (semantic_relationships_declared), whose rows are
unioned into the computed semantic_relationships.
These are thin forwarders: their rows are derived at read time by the injected
EntityGraphProvider, which enumerates the table_semantics declarations,
builds typed DataFusion derivation plans, and executes them via the query
engine. When no provider is injected (e.g. before the engine is up, or on a
non-frontend node) they stream empty. The fixed schemas here must match the
columns the provider’s plans project; JSON columns are json (JSONB), whose
Arrow storage type is Binary — the derived batches are rebuilt against the
declared Arrow schema (which carries the json extension metadata) in
SystemTable::to_stream.
Structs§
- Semantic
Graph 🔒Table - Forwarder for a computed entity-graph table.
- Semantic
Graph 🔒Table Provider - Serves the computed graph tables under
greptime_private, overlaid on the schema’s physical tables the same way thenumberstable overlayspublic(the system catalog is consulted before physical table resolution). - Table
Entity Declaration - One entity a table declares, as
information_schema.table_semanticsreports it. A catalog-side projection of the derivation’s own declaration type, which lives above this crate.
Enums§
- Declaration
Origin - Where a table’s entity declaration came from.
- Graph
Table 🔒Kind - Which computed table this shell represents, so the two share one forwarder.
Statics§
- ENTITIES_
SCHEMA 🔒 - Schema of
semantic_entities— the node set of the graph, one row per entity observed in a time window. Must match the registry derivation projection. - RELATIONSHIPS_
SCHEMA 🔒 - Schema of
semantic_relationships— the edge set of the graph, one row per edge observed in a time window. This is the 18-column contract every derived branch and the declared-edge table must project for the top-levelUNION ALL.
Traits§
- Entity
Graph Provider - Produces the rows of the computed entity-graph tables at read time.