Files
greptimedb/catalog/system_schema/semantic_graph/index.html
T

25 lines
9.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The computed entity-graph tables `greptime_private.semantic_entities` and `greptime_private.semantic_relationships`."><title>catalog::system_schema::semantic_graph - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="catalog" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module semantic_graph</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../catalog/index.html">catalog</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module semantic_<wbr>graph</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#statics" title="Statics">Statics</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In catalog::<wbr>system_<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">catalog</a>::<wbr><a href="../index.html">system_schema</a></div><h1>Module <span>semantic_<wbr>graph</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/catalog/system_schema/semantic_graph.rs.html#15-479">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The computed entity-graph tables <code>greptime_private.semantic_entities</code> and
<code>greptime_private.semantic_relationships</code>.</p>
<p>They live in <code>greptime_private</code>, not <code>information_schema</code>: scanning them
triggers read-time derivation over telemetry tables (trace self-joins, …),
which breaks the “cheap, metadata-only” expectation users have of
<code>information_schema</code>. <code>greptime_private</code> also hosts the physical
declared-edge table (<code>semantic_relationships_declared</code>), whose rows are
unioned into the computed <code>semantic_relationships</code>.</p>
<p>These are thin forwarders: their rows are derived at read time by the injected
<a href="trait.EntityGraphProvider.html" title="trait catalog::system_schema::semantic_graph::EntityGraphProvider"><code>EntityGraphProvider</code></a>, which enumerates the <code>table_semantics</code> 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 <code>json</code> (JSONB), whose
Arrow storage type is <code>Binary</code> — the derived batches are rebuilt against the
declared Arrow schema (which carries the <code>json</code> extension metadata) in
<a href="../trait.SystemTable.html#tymethod.to_stream" title="method catalog::system_schema::SystemTable::to_stream"><code>SystemTable::to_stream</code></a>.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.SemanticGraphTable.html" title="struct catalog::system_schema::semantic_graph::SemanticGraphTable">Semantic<wbr>Graph<wbr>Table</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Forwarder for a computed entity-graph table.</dd><dt><a class="struct" href="struct.SemanticGraphTableProvider.html" title="struct catalog::system_schema::semantic_graph::SemanticGraphTableProvider">Semantic<wbr>Graph<wbr>Table<wbr>Provider</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Serves the computed graph tables under <code>greptime_private</code>, overlaid on the
schema’s physical tables the same way the <code>numbers</code> table overlays <code>public</code>
(the system catalog is consulted before physical table resolution).</dd><dt><a class="struct" href="struct.TableEntityDeclaration.html" title="struct catalog::system_schema::semantic_graph::TableEntityDeclaration">Table<wbr>Entity<wbr>Declaration</a></dt><dd>One entity a table declares, as <code>information_schema.table_semantics</code>
reports it. A catalog-side projection of the derivation’s own declaration
type, which lives above this crate.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DeclarationOrigin.html" title="enum catalog::system_schema::semantic_graph::DeclarationOrigin">Declaration<wbr>Origin</a></dt><dd>Where a table’s entity declaration came from.</dd><dt><a class="enum" href="enum.GraphTableKind.html" title="enum catalog::system_schema::semantic_graph::GraphTableKind">Graph<wbr>Table<wbr>Kind</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Which computed table this shell represents, so the two share one forwarder.</dd></dl><h2 id="statics" class="section-header">Statics<a href="#statics" class="anchor">§</a></h2><dl class="item-table"><dt><a class="static" href="static.ENTITIES_SCHEMA.html" title="static catalog::system_schema::semantic_graph::ENTITIES_SCHEMA">ENTITIES_<wbr>SCHEMA</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Schema of <code>semantic_entities</code> — the node set of the graph, one row per entity
observed in a time window. Must match the registry derivation projection.</dd><dt><a class="static" href="static.RELATIONSHIPS_SCHEMA.html" title="static catalog::system_schema::semantic_graph::RELATIONSHIPS_SCHEMA">RELATIONSHIPS_<wbr>SCHEMA</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Schema of <code>semantic_relationships</code> — 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-level <code>UNION ALL</code>.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.EntityGraphProvider.html" title="trait catalog::system_schema::semantic_graph::EntityGraphProvider">Entity<wbr>Graph<wbr>Provider</a></dt><dd>Produces the rows of the computed entity-graph tables at read time.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.json.html" title="fn catalog::system_schema::semantic_graph::json">json</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.string.html" title="fn catalog::system_schema::semantic_graph::string">string</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.ts.html" title="fn catalog::system_schema::semantic_graph::ts">ts</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.EntityGraphProviderRef.html" title="type catalog::system_schema::semantic_graph::EntityGraphProviderRef">Entity<wbr>Graph<wbr>Provider<wbr>Ref</a></dt></dl></section></div></main></body></html>