From 0a8c19a123589a8177966f9dc98fb1e89fa60d80 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Mon, 28 Sep 2026 13:45:26 +0200 Subject: [PATCH 01/16] Docs: prototype versioned reference microfrontend --- .gitignore | 4 + _site/customizations/webterminal.js | 51 +- astro.config.ts | 20 +- bin/archive-reference-bodies.ts | 169 + bin/audit-reference-prototype-routes.ts | 373 ++ bin/create-reference-snapshot-fixture.ts | 41 + bin/generate-reference-prototype-versions.ts | 69 + bin/generate-reference-prototype.ts | 817 ++++ bin/generate-reference-snapshot-metadata.ts | 180 + bin/reference-route-contract.ts | 46 + bin/serve-reference-artifacts.ts | 26 + bin/serve-reference-preview.mjs | 73 + package.json | 5 +- pnpm-lock.yaml | 542 +++ reference-docs/.gitignore | 5 + reference-docs/README.md | 99 + reference-docs/astro.config.mjs | 16 + reference-docs/bin/fetch-head-snapshot.mjs | 39 + .../fixtures/snapshot/catalogs/functions.json | 26 + .../fixtures/snapshot/manifest.json | 13 + reference-docs/microfrontends.json | 26 + reference-docs/package.json | 20 + .../src/components/ReferenceBody.astro | 15 + .../src/components/ReferenceUnavailable.astro | 16 + .../src/layouts/ReferenceLayout.astro | 24 + reference-docs/src/lib/reference-archive.mjs | 34 + .../src/lib/render-function-body.mjs | 42 + reference-docs/src/lib/snapshot.mjs | 72 + .../pages/reference/[version]/[...slug].astro | 27 + .../src/pages/reference/[version]/index.astro | 26 + .../pages/reference/functions/[...slug].astro | 32 + .../src/pages/reference/index.astro | 10 + reference-docs/test/snapshot.test.mjs | 28 + reference-docs/tsconfig.json | 7 + reference-docs/vercel.json | 5 + reports/nav-vs-disk.md | 6 +- reports/reference-prototype-route-audit.json | 4222 +++++++++++++++++ reports/reference-prototype-route-audit.md | 192 + src/components.ts | 4 + src/components/ArchivedReferenceBody.astro | 240 + .../ArchivedReferenceNavigation.astro | 211 + src/components/ArchivedSettingsExplorers.tsx | 38 + src/components/Header.astro | 10 +- src/components/HomepageNavigation.astro | 12 + src/components/MobileNavigation.astro | 48 +- src/components/MobileNavigationSections.astro | 8 +- src/components/ReferenceVersionPicker.astro | 126 + src/components/SettingMetadata.astro | 18 + src/components/SettingsExplorer.tsx | 90 + src/components/ui/search/SearchTrigger.astro | 20 +- .../ui/search/search-trigger.client.ts | 4 +- src/components/ui/sidebar/SidebarGroup.astro | 8 +- src/components/ui/sidebar/sidebar.client.ts | 175 +- src/components/ui/toc/TOC.astro | 1 + src/content.config.ts | 42 +- src/env.d.ts | 9 + src/layouts/BaseLayout.astro | 123 +- src/layouts/DocsLayout.astro | 49 +- src/lib/sidebar-lazy.ts | 45 +- src/middleware.ts | 20 + src/pages/404.astro | 134 +- src/pages/[...slug].astro | 37 +- src/pages/nav/[...key].astro | 6 +- src/pages/reference/version-shell.astro | 26 + src/plugins/satteri-katex.ts | 45 + src/styles/globals.css | 290 +- 66 files changed, 9171 insertions(+), 86 deletions(-) create mode 100644 bin/archive-reference-bodies.ts create mode 100644 bin/audit-reference-prototype-routes.ts create mode 100644 bin/create-reference-snapshot-fixture.ts create mode 100644 bin/generate-reference-prototype-versions.ts create mode 100644 bin/generate-reference-prototype.ts create mode 100644 bin/generate-reference-snapshot-metadata.ts create mode 100644 bin/reference-route-contract.ts create mode 100644 bin/serve-reference-artifacts.ts create mode 100644 bin/serve-reference-preview.mjs create mode 100644 reference-docs/.gitignore create mode 100644 reference-docs/README.md create mode 100644 reference-docs/astro.config.mjs create mode 100644 reference-docs/bin/fetch-head-snapshot.mjs create mode 100644 reference-docs/fixtures/snapshot/catalogs/functions.json create mode 100644 reference-docs/fixtures/snapshot/manifest.json create mode 100644 reference-docs/microfrontends.json create mode 100644 reference-docs/package.json create mode 100644 reference-docs/src/components/ReferenceBody.astro create mode 100644 reference-docs/src/components/ReferenceUnavailable.astro create mode 100644 reference-docs/src/layouts/ReferenceLayout.astro create mode 100644 reference-docs/src/lib/reference-archive.mjs create mode 100644 reference-docs/src/lib/render-function-body.mjs create mode 100644 reference-docs/src/lib/snapshot.mjs create mode 100644 reference-docs/src/pages/reference/[version]/[...slug].astro create mode 100644 reference-docs/src/pages/reference/[version]/index.astro create mode 100644 reference-docs/src/pages/reference/functions/[...slug].astro create mode 100644 reference-docs/src/pages/reference/index.astro create mode 100644 reference-docs/test/snapshot.test.mjs create mode 100644 reference-docs/tsconfig.json create mode 100644 reference-docs/vercel.json create mode 100644 reports/reference-prototype-route-audit.json create mode 100644 reports/reference-prototype-route-audit.md create mode 100644 src/components/ArchivedReferenceBody.astro create mode 100644 src/components/ArchivedReferenceNavigation.astro create mode 100644 src/components/ArchivedSettingsExplorers.tsx create mode 100644 src/components/ReferenceVersionPicker.astro create mode 100644 src/components/SettingMetadata.astro create mode 100644 src/components/SettingsExplorer.tsx create mode 100644 src/env.d.ts create mode 100644 src/middleware.ts create mode 100644 src/pages/reference/version-shell.astro create mode 100644 src/plugins/satteri-katex.ts diff --git a/.gitignore b/.gitignore index 7e7ef9d45..d8609f954 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,10 @@ tmp/ src/generated/ public/_astro/ .preview-scope.json +# Derived reference pages are regenerated from a ClickHouse snapshot. Keep the +# snapshot renderer and archive tooling in Git, but never commit its 24MB local +# preview tree. +reference-prototype/ # Local-only Mintlify leftovers package-lock.json .nimbus/ diff --git a/_site/customizations/webterminal.js b/_site/customizations/webterminal.js index a17845a8e..07793ad3b 100644 --- a/_site/customizations/webterminal.js +++ b/_site/customizations/webterminal.js @@ -57,9 +57,15 @@ + ''; function injectStyles() { - if (document.getElementById(STYLE_ID)) return; - var style = document.createElement('style'); - style.id = STYLE_ID; + var style = document.getElementById(STYLE_ID); + // BaseLayout supplies a persistent empty style shell so that the terminal + // does not briefly lose its fixed positioning during Astro navigation. + if (style && style.dataset.webterminalReady === 'true') return; + if (!style) { + style = document.createElement('style'); + style.id = STYLE_ID; + document.head.appendChild(style); + } style.textContent = '' // Keep the collapsed tray fixed across the viewport. The document and sidebar deliberately // keep their full height and scroll behind it; opening the panel extends the overlay upward. @@ -104,7 +110,7 @@ + '#' + ACTION_ID + ' svg { width: 16px; height: 16px; }' + '#' + PANEL_ID + '.' + OPEN_CLASS + ' #' + ACTION_ID + ' svg { transform: rotate(180deg); }' + '@media (max-width: ' + (DESKTOP_MIN_WIDTH - 1) + 'px) { #' + DOCK_ID + ' { display: none; } }'; - document.head.appendChild(style); + style.dataset.webterminalReady = 'true'; } function maxTerminalHeight() { @@ -159,8 +165,40 @@ if (panel) return; injectStyles(); - dock = document.createElement('div'); - dock.id = DOCK_ID; + // Use BaseLayout's persistent dock when available. The dynamic terminal + // panel then survives a client-side page swap instead of being rebuilt. + dock = document.getElementById(DOCK_ID); + if (!dock) { + dock = document.createElement('div'); + dock.id = DOCK_ID; + document.body.appendChild(dock); + } + + // BaseLayout renders the collapsed tray in the initial HTML. Enhance that + // stable shell instead of removing and recreating it once this deferred + // script has arrived. + panel = document.getElementById(PANEL_ID); + if (panel) { + viewport = document.getElementById(VIEWPORT_ID); + resizer = document.getElementById(RESIZER_ID); + toggle = document.getElementById(TOGGLE_ID); + action = document.getElementById(ACTION_ID); + if (!viewport || !resizer || !toggle || !action) { + panel = null; + } else { + viewport.addEventListener('wheel', function (e) { + if (!terminalOpen) return; + e.preventDefault(); + e.stopPropagation(); + }, {passive: false}); + resizer.addEventListener('pointerdown', startResize); + resizer.addEventListener('touchstart', function (e) { e.preventDefault(); }); + toggle.addEventListener('click', toggleTerminal); + action.addEventListener('click', toggleTerminal); + updateControls(); + return; + } + } panel = document.createElement('section'); panel.id = PANEL_ID; @@ -210,7 +248,6 @@ panel.appendChild(tray); dock.appendChild(panel); - document.body.appendChild(dock); updateControls(); } diff --git a/astro.config.ts b/astro.config.ts index 1f614acfc..5b4e2f287 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -7,6 +7,7 @@ import { tableScroll } from "@cloudflare/nimbus-docs/markdown"; import { satteri } from "@astrojs/markdown-satteri"; import { rebaseUrls } from "./src/plugins/satteri-rebase-urls"; import { mermaidBlocks } from "./src/plugins/satteri-mermaid"; +import { katexMathMarkers, katexMathRenderer } from "./src/plugins/satteri-katex"; import { SATTERI_FEATURES } from "./src/plugins/satteri-features"; import { readScope } from "./src/lib/scope"; import type { HastPluginDefinition } from "satteri"; @@ -120,7 +121,8 @@ export default defineConfig({ // Nimbus). Nimbus's own hast plugins must be re-added here. processor: satteri({ features: SATTERI_FEATURES, - hastPlugins: [nimbusTableScroll, rebaseUrls({ base: BASE, remoteMounts }), mermaidBlocks()], + mdastPlugins: [katexMathMarkers], + hastPlugins: [nimbusTableScroll, rebaseUrls({ base: BASE, remoteMounts }), mermaidBlocks(), katexMathRenderer], }), // The prepared Markdown surfaces are for agents rather than the web // renderer. Preserve agent-only content and reduce the path selector @@ -143,6 +145,22 @@ export default defineConfig({ }), ], vite: { + // In local development, expose the separately-running archived-artifact + // server through the same origin as the docs app. This avoids cross-origin + // browser restrictions while keeping the component contract identical to + // production, where the website worker serves this prefix from storage. + server: { + proxy: { + // Astro removes `base` before Vite evaluates the proxy matcher, so + // the browser's `/docs/reference-artifacts/...` request is seen here + // as `/reference-artifacts/...`. + "/reference-artifacts": { + target: "http://127.0.0.1:4323", + changeOrigin: true, + rewrite: (path) => path.replace(/^\/reference-artifacts/, ""), + }, + }, + }, // The Vite dependency optimizer currently resolves React's development // JSX runtime to its production implementation in this project. The // production runtime intentionally leaves `jsxDEV` undefined, which made diff --git a/bin/archive-reference-bodies.ts b/bin/archive-reference-bodies.ts new file mode 100644 index 000000000..d53347b60 --- /dev/null +++ b/bin/archive-reference-bodies.ts @@ -0,0 +1,169 @@ +/** + * Local release-archive prototype. + * + * It reads complete, already rendered reference pages and writes only their + * document-article HTML plus navigation data and a small manifest. A release + * job supplies REFERENCE_ARCHIVE_BUILD_DIR (the completed static output); the + * HTTP input is retained solely for the fast local prototype. + */ +import fs from "node:fs"; +import path from "node:path"; + +const version = process.env.REFERENCE_ARCHIVE_VERSION ?? "26.9"; +const origin = (process.env.REFERENCE_ARCHIVE_ORIGIN ?? "http://127.0.0.1:4321/docs").replace(/\/$/, ""); +const sourceRoot = path.join(process.cwd(), "reference-prototype", version); +const finalOutputRoot = path.resolve(process.env.REFERENCE_ARCHIVE_OUTPUT_DIR ?? "/private/tmp/reference-artifacts", version, "en"); +const outputRoot = `${finalOutputRoot}.staging`; +const buildRoot = process.env.REFERENCE_ARCHIVE_BUILD_DIR + ? path.resolve(process.env.REFERENCE_ARCHIVE_BUILD_DIR) + : undefined; +const articleOpen = '
'; + +function files(directory: string): string[] { + return fs.readdirSync(directory, { withFileTypes: true }).flatMap((entry) => { + const target = path.join(directory, entry.name); + return entry.isDirectory() ? files(target) : entry.name.endsWith(".mdx") ? [target] : []; + }); +} + +function routeFor(file: string) { + const relative = path.relative(sourceRoot, file).replace(/\.mdx$/, "").split(path.sep).join("/"); + return relative === "index" ? "" : relative.replace(/\/index$/, ""); +} + +function titleFor(file: string) { + const source = fs.readFileSync(file, "utf8"); + const match = source.match(/^title:\s*("(?:[^"\\]|\\.)*")\s*$/m); + return match ? JSON.parse(match[1]) as string : routeFor(file) || "Reference"; +} + +const settingsExplorerRoutes: Record = { + "settings/session-settings": "session-settings", + "settings/server-settings/settings": "server-settings", + "settings/merge-tree-settings": "merge-tree-settings", +}; + +function normalizeBody(body: string, route: string) { + // The archive is a content contract, never an Astro build artifact. Strip + // component scope IDs and turn callouts into a stable semantic marker that + // the live reference shell can style in future releases. + const explorer = settingsExplorerRoutes[route]; + const normalized = body + .replace(/\sdata-astro-cid-[^\s=>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?/g, "") + // Client islands are build artifacts. A historical body is inserted into + // the current shell, where these scripts cannot (and must not) hydrate. + // Replace the settings island with a stable semantic mount point instead. + .replace(/ diff --git a/reference-docs/src/components/ReferenceUnavailable.astro b/reference-docs/src/components/ReferenceUnavailable.astro new file mode 100644 index 000000000..98c59a80d --- /dev/null +++ b/reference-docs/src/components/ReferenceUnavailable.astro @@ -0,0 +1,16 @@ +--- +const { reason } = Astro.props; +--- + +
+

Reference documentation

+

Reference content is not available yet

+

{reason}

+
+ + diff --git a/reference-docs/src/layouts/ReferenceLayout.astro b/reference-docs/src/layouts/ReferenceLayout.astro new file mode 100644 index 000000000..e7e6f8979 --- /dev/null +++ b/reference-docs/src/layouts/ReferenceLayout.astro @@ -0,0 +1,24 @@ +--- +const { title, version } = Astro.props; +--- + + + + + + + {title} | ClickHouse Reference + + + +
ClickHouse DocsReference{version ? ` · ${version}` : ""}
+ + + + + diff --git a/reference-docs/src/lib/reference-archive.mjs b/reference-docs/src/lib/reference-archive.mjs new file mode 100644 index 000000000..fc7e41f70 --- /dev/null +++ b/reference-docs/src/lib/reference-archive.mjs @@ -0,0 +1,34 @@ +const DEFAULT_PREFIX = "sites"; + +function trimSlashes(value) { + return String(value ?? "").replace(/^\/+|\/+$/g, ""); +} + +export function archiveVersion(versionSlug) { + if (!/^\d+(?:-\d+)+$/.test(versionSlug)) return null; + return versionSlug.replaceAll("-", "."); +} + +export function bodyUrl(origin, version, slug, locale = "en", prefix = DEFAULT_PREFIX) { + const path = trimSlashes(slug).split("/").filter(Boolean); + const key = [trimSlashes(prefix), encodeURIComponent(version), encodeURIComponent(locale)]; + key.push(...path.map(encodeURIComponent), "body.html"); + return `${origin.replace(/\/$/, "")}/${key.join("/")}`; +} + +export async function fetchArchivedBody({ origin, version, slug, fetchImpl = fetch }) { + if (!origin) return { state: "unconfigured" }; + const url = bodyUrl(origin, version, slug, process.env.REFERENCE_ARCHIVE_LOCALE ?? "en", process.env.REFERENCE_ARCHIVE_S3_PREFIX ?? DEFAULT_PREFIX); + try { + const response = await fetchImpl(url, { + headers: { accept: "text/html" }, + redirect: "error", + signal: AbortSignal.timeout(5_000), + }); + if (response.status === 404) return { state: "missing", url }; + if (!response.ok) return { state: "unavailable", url }; + return { state: "ready", html: await response.text(), url }; + } catch { + return { state: "unavailable", url }; + } +} diff --git a/reference-docs/src/lib/render-function-body.mjs b/reference-docs/src/lib/render-function-body.mjs new file mode 100644 index 000000000..7d69b2f0d --- /dev/null +++ b/reference-docs/src/lib/render-function-body.mjs @@ -0,0 +1,42 @@ +function escapeHtml(value) { + return String(value ?? "") + .replaceAll("&", "&") + .replaceAll("<", "<") + .replaceAll(">", ">") + .replaceAll('"', """) + .replaceAll("'", "'"); +} + +function functionAnchor(name) { + return `function-${String(name).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "")}`; +} + +function field(title, value, language) { + if (!value) return ""; + const rendered = language + ? `
${escapeHtml(value)}
` + : `
${escapeHtml(value).replaceAll("\n", "
")}
`; + return `

${escapeHtml(title)}

${rendered}
`; +} + +/** + * Render a deliberately narrow and safe first body contract. Source fields + * are Markdown today, so this preserves their text rather than treating them + * as trusted HTML. Production can replace the field renderer with the shared + * Satteri pipeline without changing snapshot shape or page routing. + */ +export function renderFunctionBody(functions) { + return functions.map((fn) => { + const aliases = Array.isArray(fn.aliases) ? fn.aliases : []; + return `
+

${escapeHtml(fn.name)}

+ ${fn.introduced_in ? `

Introduced in v${escapeHtml(fn.introduced_in)}

` : ""} + ${field("Description", fn.description)} + ${field("Syntax", fn.syntax, "sql")} + ${aliases.length ? `

Aliases: ${aliases.map(escapeHtml).join(", ")}

` : ""} + ${field("Arguments", fn.arguments)} + ${field("Returned value", fn.returned_value)} + ${field("Examples", fn.examples, "sql")} +
`; + }).join("\n"); +} diff --git a/reference-docs/src/lib/snapshot.mjs b/reference-docs/src/lib/snapshot.mjs new file mode 100644 index 000000000..c6720b6fa --- /dev/null +++ b/reference-docs/src/lib/snapshot.mjs @@ -0,0 +1,72 @@ +import { createHash } from "node:crypto"; +import { readFileSync } from "node:fs"; +import path from "node:path"; + +export const SNAPSHOT_SCHEMA_VERSION = 1; + +function canonicalJson(value) { + return `${JSON.stringify(value, Object.keys(value).sort(), 2)}\n`; +} + +function sha256(value) { + return createHash("sha256").update(value).digest("hex"); +} + +function readJson(file) { + return JSON.parse(readFileSync(file, "utf8")); +} + +export function loadSnapshot(root = process.env.REFERENCE_SNAPSHOT_DIR ?? "./fixtures/snapshot") { + const resolvedRoot = path.resolve(root); + const manifest = readJson(path.join(resolvedRoot, "manifest.json")); + if (manifest.schemaVersion !== SNAPSHOT_SCHEMA_VERSION) { + throw new Error(`Unsupported reference snapshot schema: ${manifest.schemaVersion}`); + } + if (!Array.isArray(manifest.catalogs)) { + throw new Error("Reference snapshot manifest has no catalogs array"); + } + + const catalogs = new Map(); + for (const catalog of manifest.catalogs) { + if (!catalog?.name || !catalog?.path || !catalog?.sha256) { + throw new Error("Reference snapshot catalog is missing its name, path, or digest"); + } + const file = path.resolve(resolvedRoot, catalog.path); + if (!file.startsWith(`${resolvedRoot}${path.sep}`)) { + throw new Error(`Reference snapshot catalog escapes its root: ${catalog.path}`); + } + const source = readFileSync(file, "utf8"); + if (sha256(source) !== catalog.sha256) { + throw new Error(`Reference snapshot catalog digest mismatch: ${catalog.name}`); + } + const rows = JSON.parse(source); + if (!Array.isArray(rows) || rows.length !== catalog.rows) { + throw new Error(`Reference snapshot catalog row count mismatch: ${catalog.name}`); + } + catalogs.set(catalog.name, rows); + } + return { manifest, catalogs }; +} + +export function referenceFunctions(snapshot) { + const rows = snapshot.catalogs.get("functions"); + if (!rows) throw new Error("Reference snapshot does not contain functions"); + return rows.filter((row) => row.alias_to === "" && Number(row.is_aggregate) === 0); +} + +export function categorySlug(category) { + return category.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, ""); +} + +export function categories(snapshot) { + return [...new Set(referenceFunctions(snapshot).map((row) => row.categories).filter(Boolean))] + .sort((a, b) => a.localeCompare(b)); +} + +export function functionsForCategory(snapshot, category) { + return referenceFunctions(snapshot) + .filter((row) => row.categories === category) + .sort((a, b) => a.name.localeCompare(b.name)); +} + +export { canonicalJson }; diff --git a/reference-docs/src/pages/reference/[version]/[...slug].astro b/reference-docs/src/pages/reference/[version]/[...slug].astro new file mode 100644 index 000000000..651d893c6 --- /dev/null +++ b/reference-docs/src/pages/reference/[version]/[...slug].astro @@ -0,0 +1,27 @@ +--- +import ReferenceBody from "../../../components/ReferenceBody.astro"; +import ReferenceLayout from "../../../layouts/ReferenceLayout.astro"; +import ReferenceUnavailable from "../../../components/ReferenceUnavailable.astro"; +import { archiveVersion, fetchArchivedBody } from "../../../lib/reference-archive.mjs"; + +export const prerender = false; + +const version = archiveVersion(Astro.params.version); +if (!version) Astro.response.status = 404; +const result = version + ? await fetchArchivedBody({ origin: import.meta.env.REFERENCE_ARCHIVE_S3_ORIGIN, version, slug: Astro.params.slug }) + : { state: "missing" }; + +const reason = result.state === "unconfigured" + ? "The archived-reference S3 origin has not been configured for this deployment." + : result.state === "missing" + ? "This page does not exist in the selected release archive." + : "The archived reference content could not be reached. Please try again shortly."; + +if (result.state !== "ready") Astro.response.status = result.state === "missing" ? 404 : 503; +Astro.response.headers.set("cache-control", result.state === "ready" ? "public, s-maxage=60, stale-while-revalidate=300" : "no-store"); +--- + + + {result.state === "ready" ? : } + diff --git a/reference-docs/src/pages/reference/[version]/index.astro b/reference-docs/src/pages/reference/[version]/index.astro new file mode 100644 index 000000000..93c0d4acd --- /dev/null +++ b/reference-docs/src/pages/reference/[version]/index.astro @@ -0,0 +1,26 @@ +--- +import ReferenceBody from "../../../components/ReferenceBody.astro"; +import ReferenceLayout from "../../../layouts/ReferenceLayout.astro"; +import ReferenceUnavailable from "../../../components/ReferenceUnavailable.astro"; +import { archiveVersion, fetchArchivedBody } from "../../../lib/reference-archive.mjs"; + +export const prerender = false; + +const version = archiveVersion(Astro.params.version); +if (!version) Astro.response.status = 404; +const result = version + ? await fetchArchivedBody({ origin: import.meta.env.REFERENCE_ARCHIVE_S3_ORIGIN, version, slug: "" }) + : { state: "missing" }; +const reason = result.state === "unconfigured" + ? "The archived-reference S3 origin has not been configured for this deployment." + : result.state === "missing" + ? "This page does not exist in the selected release archive." + : "The archived reference content could not be reached. Please try again shortly."; + +if (result.state !== "ready") Astro.response.status = result.state === "missing" ? 404 : 503; +Astro.response.headers.set("cache-control", result.state === "ready" ? "public, s-maxage=60, stale-while-revalidate=300" : "no-store"); +--- + + + {result.state === "ready" ? : } + diff --git a/reference-docs/src/pages/reference/functions/[...slug].astro b/reference-docs/src/pages/reference/functions/[...slug].astro new file mode 100644 index 000000000..ff0a385b3 --- /dev/null +++ b/reference-docs/src/pages/reference/functions/[...slug].astro @@ -0,0 +1,32 @@ +--- +import ReferenceBody from "../../../components/ReferenceBody.astro"; +import ReferenceLayout from "../../../layouts/ReferenceLayout.astro"; +import { categories, categorySlug, functionsForCategory, loadSnapshot } from "../../../lib/snapshot.mjs"; +import { renderFunctionBody } from "../../../lib/render-function-body.mjs"; + +// The unversioned Head tree is produced once during the deployment build. +export const prerender = true; + +export function getStaticPaths() { + try { + const snapshot = loadSnapshot(process.env.REFERENCE_SNAPSHOT_DIR); + return categories(snapshot).map((category) => ({ + params: { slug: categorySlug(category) }, + props: { category }, + })); + } catch { + // A bucket-less first deployment must not render the checked-in test + // fixture. It has a static landing page, but no Head content routes. + return []; + } +} + +const snapshot = loadSnapshot(process.env.REFERENCE_SNAPSHOT_DIR); +const { category } = Astro.props; +const functions = functionsForCategory(snapshot, category); +const body = renderFunctionBody(functions); +--- + + + + diff --git a/reference-docs/src/pages/reference/index.astro b/reference-docs/src/pages/reference/index.astro new file mode 100644 index 000000000..03b62e6aa --- /dev/null +++ b/reference-docs/src/pages/reference/index.astro @@ -0,0 +1,10 @@ +--- +import ReferenceLayout from "../../layouts/ReferenceLayout.astro"; +import ReferenceUnavailable from "../../components/ReferenceUnavailable.astro"; + +export const prerender = true; +--- + + + + diff --git a/reference-docs/test/snapshot.test.mjs b/reference-docs/test/snapshot.test.mjs new file mode 100644 index 000000000..bb33e5426 --- /dev/null +++ b/reference-docs/test/snapshot.test.mjs @@ -0,0 +1,28 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { categorySlug, categories, functionsForCategory, loadSnapshot } from "../src/lib/snapshot.mjs"; +import { renderFunctionBody } from "../src/lib/render-function-body.mjs"; +import { archiveVersion, bodyUrl } from "../src/lib/reference-archive.mjs"; + +test("snapshot fixture produces the arithmetic function page", () => { + const snapshot = loadSnapshot(new URL("../fixtures/snapshot", import.meta.url).pathname); + assert.deepEqual(categories(snapshot), ["Arithmetic"]); + assert.equal(categorySlug("Arithmetic"), "arithmetic"); + const body = renderFunctionBody(functionsForCategory(snapshot, "Arithmetic")); + assert.match(body, /

minus<\/h2>/); + assert.match(body, /

plus<\/h2>/); +}); + +test("body rendering never trusts source HTML", () => { + const body = renderFunctionBody([{ name: "x", alias_to: "", is_aggregate: 0, description: "" }]); + assert.match(body, /<script>bad\(\)<\/script>/); +}); + +test("archived routes use the body-only sites prefix", () => { + assert.equal(archiveVersion("26-9"), "26.9"); + assert.equal(archiveVersion("head"), null); + assert.equal( + bodyUrl("https://docs-artifacts.example", "26.9", "data-types/string"), + "https://docs-artifacts.example/sites/26.9/en/data-types/string/body.html", + ); +}); diff --git a/reference-docs/tsconfig.json b/reference-docs/tsconfig.json new file mode 100644 index 000000000..e614b3a0d --- /dev/null +++ b/reference-docs/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "astro/tsconfigs/strict", + "include": [ + "src/**/*.astro", + "src/**/*.mjs" + ] +} diff --git a/reference-docs/vercel.json b/reference-docs/vercel.json new file mode 100644 index 000000000..ddfb9ff18 --- /dev/null +++ b/reference-docs/vercel.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": "astro", + "buildCommand": "pnpm build" +} diff --git a/reports/nav-vs-disk.md b/reports/nav-vs-disk.md index 8d36e9427..0d8460179 100644 --- a/reports/nav-vs-disk.md +++ b/reports/nav-vs-disk.md @@ -1,6 +1,6 @@ -# Navigation vs disk (en, generated 2026-09-06) +# Navigation vs disk (en, generated 2026-09-25) -- Tabs: 5; pages referenced by navigation: 2732; pages on disk in content sections: 2680. +- Tabs: 5; pages referenced by navigation: 2733; pages on disk in content sections: 2681. - Navigation entries without a file: 0. - Files not referenced by navigation (orphans, still built and reachable by URL): 14. - Groups whose authored order differs from alphabetical disk order: 217. @@ -148,7 +148,7 @@ - Solutions > ClickHouse Cloud > ClickHouse Private > Tutorials: 6 pages, authored order differs from alphabetical - Solutions > ClickHouse Cloud > ClickHouse Private > How-To Guides: 17 pages, authored order differs from alphabetical - Solutions > ClickHouse Cloud > ClickHouse Private > Reference: 8 pages, authored order differs from alphabetical -- Solutions > ClickHouse Cloud > ClickHouse Private > Explanation: 6 pages, authored order differs from alphabetical +- Solutions > ClickHouse Cloud > ClickHouse Private > Explanation: 7 pages, authored order differs from alphabetical - Solutions > ClickHouse Cloud > ClickHouse Private: 3 pages, authored order differs from alphabetical - Solutions > ClickHouse Managed Postgres > Features: 14 pages, authored order differs from alphabetical - Solutions > ClickHouse Managed Postgres > Migrations: 8 pages, authored order differs from alphabetical diff --git a/reports/reference-prototype-route-audit.json b/reports/reference-prototype-route-audit.json new file mode 100644 index 000000000..b1bc19a43 --- /dev/null +++ b/reports/reference-prototype-route-audit.json @@ -0,0 +1,4222 @@ +{ + "generatedAt": "2026-09-24T16:42:20.347Z", + "summary": { + "currentPages": 1318, + "currentAutogeneratedPages": 1240, + "currentManualPages": 78, + "currentPagesWithSiteContentOutsideGenerated": 251, + "currentMarkerWrappedPages": 989, + "currentAutogeneratedRoutesWithoutSnapshotCounterpart": 22, + "classifiedLegacyExceptions": 22, + "unclassifiedLegacyExceptions": 0, + "intentionalSnapshotOmissions": 14, + "generatedPages": 1495, + "exactRouteMatches": 1247, + "generatedRoutesWithoutCurrentPage": 248, + "currentAutogeneratedRoutesNotGenerated": 22, + "normalizedRouteCandidates": 0, + "titleCandidates": 5, + "generatedRoutesCoveredByExactOrCandidate": 1252, + "currentAutogeneratedRoutesCoveredByExactOrCandidate": 1218, + "currentAutogeneratedRoutesStillUncovered": 0 + }, + "currentManualByCategory": [ + { + "name": "data-types", + "count": 1 + }, + { + "name": "data-types/data-types-binary-encoding", + "count": 1 + }, + { + "name": "data-types/domains", + "count": 1 + }, + { + "name": "data-types/nested-data-structures", + "count": 1 + }, + { + "name": "data-types/special-data-types", + "count": 5 + }, + { + "name": "datalakes", + "count": 1 + }, + { + "name": "engines/database-engines", + "count": 1 + }, + { + "name": "engines/engines", + "count": 1 + }, + { + "name": "engines/table-engines", + "count": 9 + }, + { + "name": "formats", + "count": 1 + }, + { + "name": "formats/JSON", + "count": 1 + }, + { + "name": "formats/Puffin", + "count": 2 + }, + { + "name": "functions", + "count": 1 + }, + { + "name": "functions/aggregate-functions", + "count": 8 + }, + { + "name": "functions/regular-functions", + "count": 16 + }, + { + "name": "functions/table-functions", + "count": 3 + }, + { + "name": "functions/window-functions", + "count": 3 + }, + { + "name": "home", + "count": 1 + }, + { + "name": "interfaces/specs", + "count": 2 + }, + { + "name": "operators", + "count": 1 + }, + { + "name": "operators/distributed-ddl", + "count": 1 + }, + { + "name": "operators/exists", + "count": 1 + }, + { + "name": "settings", + "count": 1 + }, + { + "name": "settings/formats", + "count": 1 + }, + { + "name": "settings/server-settings", + "count": 1 + }, + { + "name": "settings/session-settings", + "count": 1 + }, + { + "name": "statements", + "count": 1 + }, + { + "name": "statements/create", + "count": 6 + }, + { + "name": "syntax", + "count": 1 + }, + { + "name": "system-tables/keeper_storage", + "count": 1 + }, + { + "name": "system-tables/overview", + "count": 1 + }, + { + "name": "system-tables/system_warnings", + "count": 1 + }, + { + "name": "system-tables/zookeeper_watches", + "count": 1 + } + ], + "currentPagesWithSiteContentOutsideGeneratedByTopLevel": [ + { + "name": "engines", + "count": 4 + }, + { + "name": "functions", + "count": 75 + }, + { + "name": "settings", + "count": 2 + }, + { + "name": "system-tables", + "count": 170 + } + ], + "currentAutogeneratedRoutesWithoutSnapshotCounterpartByTopLevel": [ + { + "name": "formats", + "count": 1 + }, + { + "name": "functions", + "count": 2 + }, + { + "name": "settings", + "count": 14 + }, + { + "name": "system-tables", + "count": 5 + } + ], + "exactByTopLevel": [ + { + "name": "data-types", + "count": 30 + }, + { + "name": "datalakes", + "count": 1 + }, + { + "name": "engines", + "count": 69 + }, + { + "name": "formats", + "count": 100 + }, + { + "name": "functions", + "count": 278 + }, + { + "name": "settings", + "count": 477 + }, + { + "name": "statements", + "count": 125 + }, + { + "name": "system-tables", + "count": 167 + } + ], + "generatedNewByCategory": [ + { + "name": "data-types", + "count": 40 + }, + { + "name": "engines", + "count": 38 + }, + { + "name": "formats", + "count": 14 + }, + { + "name": "functions", + "count": 133 + }, + { + "name": "interfaces", + "count": 1 + }, + { + "name": "reference root", + "count": 1 + }, + { + "name": "statements", + "count": 16 + }, + { + "name": "system-tables", + "count": 5 + } + ], + "currentAutogeneratedOmittedByCategory": [ + { + "name": "formats", + "count": 1 + }, + { + "name": "functions", + "count": 2 + }, + { + "name": "settings", + "count": 14 + }, + { + "name": "system-tables", + "count": 5 + } + ], + "currentAutogeneratedStillUncoveredByCategory": [], + "normalizedRouteCandidates": [], + "titleCandidates": [ + { + "from": "/reference/engines/engines", + "to": "/reference/engines", + "title": "Engines" + }, + { + "from": "/reference/functions/regular-functions/geo", + "to": "/reference/functions/regular-functions/geo-functions", + "title": "Geo functions" + }, + { + "from": "/reference/functions/table-functions/cluster", + "to": "/reference/functions/table-functions/cluster-2", + "title": "clusterAllReplicas" + }, + { + "from": "/reference/statements/create/dictionary/layouts/overview", + "to": "/reference/statements/create/dictionary/layouts", + "title": "Dictionary layouts" + }, + { + "from": "/reference/statements/create/dictionary/sources/overview", + "to": "/reference/statements/create/dictionary/sources", + "title": "Dictionary sources" + } + ], + "currentManualPages": [ + { + "route": "/reference/data-types", + "title": "Data Types in ClickHouse", + "file": "reference/data-types/index.mdx" + }, + { + "route": "/reference/data-types/data-types-binary-encoding", + "title": "Data types binary encoding specification", + "file": "reference/data-types/data-types-binary-encoding.mdx" + }, + { + "route": "/reference/data-types/domains", + "title": "Domains", + "file": "reference/data-types/domains/index.mdx" + }, + { + "route": "/reference/data-types/nested-data-structures", + "title": "Nested(name1 Type1, Name2 Type2, ...)", + "file": "reference/data-types/nested-data-structures/index.mdx" + }, + { + "route": "/reference/data-types/special-data-types", + "title": "Special Data Types", + "file": "reference/data-types/special-data-types/index.mdx" + }, + { + "route": "/reference/data-types/special-data-types/expression", + "title": "Expression", + "file": "reference/data-types/special-data-types/expression.mdx" + }, + { + "route": "/reference/data-types/special-data-types/interval", + "title": "Interval", + "file": "reference/data-types/special-data-types/interval.mdx" + }, + { + "route": "/reference/data-types/special-data-types/nothing", + "title": "Nothing", + "file": "reference/data-types/special-data-types/nothing.mdx" + }, + { + "route": "/reference/data-types/special-data-types/set", + "title": "Set", + "file": "reference/data-types/special-data-types/set.mdx" + }, + { + "route": "/reference/datalakes", + "title": "Data Lakes", + "file": "reference/datalakes.mdx" + }, + { + "route": "/reference/engines/database-engines/shared", + "title": "Shared", + "file": "reference/engines/database-engines/shared.mdx" + }, + { + "route": "/reference/engines/engines", + "title": "Engines", + "file": "reference/engines/engines.mdx" + }, + { + "route": "/reference/engines/table-engines", + "title": "Table Engines", + "file": "reference/engines/table-engines/index.mdx" + }, + { + "route": "/reference/engines/table-engines/integrations/ExternalDistributed", + "title": "ExternalDistributed table engine", + "file": "reference/engines/table-engines/integrations/ExternalDistributed.mdx" + }, + { + "route": "/reference/engines/table-engines/log-family", + "title": "Log engine family", + "file": "reference/engines/table-engines/log-family/index.mdx" + }, + { + "route": "/reference/engines/table-engines/mergetree-family/annindexes", + "title": "Exact and Approximate Vector Search", + "file": "reference/engines/table-engines/mergetree-family/annindexes.mdx" + }, + { + "route": "/reference/engines/table-engines/mergetree-family/custom-partitioning-key", + "title": "Custom Partitioning Key", + "file": "reference/engines/table-engines/mergetree-family/custom-partitioning-key.mdx" + }, + { + "route": "/reference/engines/table-engines/mergetree-family/replication", + "title": "Replicated* table engines", + "file": "reference/engines/table-engines/mergetree-family/replication.mdx" + }, + { + "route": "/reference/engines/table-engines/mergetree-family/textindexes", + "title": "Full-text Search with Text Indexes", + "file": "reference/engines/table-engines/mergetree-family/textindexes.mdx" + }, + { + "route": "/reference/engines/table-engines/special/external-data", + "title": "External data for query processing", + "file": "reference/engines/table-engines/special/external-data.mdx" + }, + { + "route": "/reference/engines/table-engines/special/query-runner", + "title": "QueryRunner table engine", + "file": "reference/engines/table-engines/special/query-runner.mdx" + }, + { + "route": "/reference/formats", + "title": "Formats for input and output data", + "file": "reference/formats/index.mdx" + }, + { + "route": "/reference/formats/JSON/format-settings", + "title": "Format Settings For JSON", + "file": "reference/formats/JSON/format-settings.mdx" + }, + { + "route": "/reference/formats/Puffin/Puffin", + "title": "Puffin", + "file": "reference/formats/Puffin/Puffin.mdx" + }, + { + "route": "/reference/formats/Puffin/PuffinMetadata", + "title": "PuffinMetadata", + "file": "reference/formats/Puffin/PuffinMetadata.mdx" + }, + { + "route": "/reference/functions", + "title": "Functions Overview", + "file": "reference/functions/index.mdx" + }, + { + "route": "/reference/functions/aggregate-functions", + "title": "Aggregate Functions", + "file": "reference/functions/aggregate-functions/index.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/combinators", + "title": "Aggregate Function Combinators", + "file": "reference/functions/aggregate-functions/combinators.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/first_value", + "title": "first_value", + "file": "reference/functions/aggregate-functions/first_value.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/groupArrayArray", + "title": "groupArrayArray", + "file": "reference/functions/aggregate-functions/groupArrayArray.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/grouping_function", + "title": "GROUPING", + "file": "reference/functions/aggregate-functions/grouping_function.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/last_value", + "title": "last_value", + "file": "reference/functions/aggregate-functions/last_value.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/median", + "title": "median", + "file": "reference/functions/aggregate-functions/median.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/parametric-functions", + "title": "Parametric Aggregate Functions", + "file": "reference/functions/aggregate-functions/parametric-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/array-join", + "title": "arrayJoin function", + "file": "reference/functions/regular-functions/array-join.mdx" + }, + { + "route": "/reference/functions/regular-functions/files", + "title": "Files", + "file": "reference/functions/regular-functions/files.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo", + "title": "Geo Functions", + "file": "reference/functions/regular-functions/geo/index.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/coordinates", + "title": "Functions for Working with Geographical Coordinates", + "file": "reference/functions/regular-functions/geo/coordinates.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/flipCoordinates", + "title": "Flipping Coordinates", + "file": "reference/functions/regular-functions/geo/flipCoordinates.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/geohash", + "title": "Functions for Working with Geohash", + "file": "reference/functions/regular-functions/geo/geohash.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/geometry", + "title": "Functions for Working with Geometry", + "file": "reference/functions/regular-functions/geo/geometry.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/h3", + "title": "Functions for Working with H3 Indexes", + "file": "reference/functions/regular-functions/geo/h3.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/mvt", + "title": "Functions for Encoding Mapbox Vector Tiles", + "file": "reference/functions/regular-functions/geo/mvt.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/polygon", + "title": "Functions for Working with Polygons", + "file": "reference/functions/regular-functions/geo/polygon.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/s2", + "title": "Functions for Working with S2 Index", + "file": "reference/functions/regular-functions/geo/s2.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo/svg", + "title": "Functions for Generating SVG images from Geo data", + "file": "reference/functions/regular-functions/geo/svg.mdx" + }, + { + "route": "/reference/functions/regular-functions/in-functions", + "title": "Functions for Implementing the IN Operator", + "file": "reference/functions/regular-functions/in-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/overview", + "title": "Regular Functions", + "file": "reference/functions/regular-functions/overview.mdx" + }, + { + "route": "/reference/functions/regular-functions/udf", + "title": "User Defined Functions (UDFs)", + "file": "reference/functions/regular-functions/udf.mdx" + }, + { + "route": "/reference/functions/regular-functions/wasm_udf", + "title": "WebAssembly User Defined Functions", + "file": "reference/functions/regular-functions/wasm_udf.mdx" + }, + { + "route": "/reference/functions/table-functions", + "title": "Table Functions", + "file": "reference/functions/table-functions/index.mdx" + }, + { + "route": "/reference/functions/table-functions/eval", + "title": "eval", + "file": "reference/functions/table-functions/eval.mdx" + }, + { + "route": "/reference/functions/table-functions/timeSeriesData", + "title": "timeSeriesData", + "file": "reference/functions/table-functions/timeSeriesData.mdx" + }, + { + "route": "/reference/functions/window-functions", + "title": "Window Functions", + "file": "reference/functions/window-functions/index.mdx" + }, + { + "route": "/reference/functions/window-functions/first_value", + "title": "first_value", + "file": "reference/functions/window-functions/first_value.mdx" + }, + { + "route": "/reference/functions/window-functions/last_value", + "title": "last_value", + "file": "reference/functions/window-functions/last_value.mdx" + }, + { + "route": "/reference/home", + "title": "Reference", + "file": "reference/home.mdx" + }, + { + "route": "/reference/interfaces/specs/NativeFormat", + "title": "Native Format", + "file": "reference/interfaces/specs/NativeFormat.mdx" + }, + { + "route": "/reference/interfaces/specs/NativeProtocol", + "title": "Native Protocol", + "file": "reference/interfaces/specs/NativeProtocol.mdx" + }, + { + "route": "/reference/operators", + "title": "Operators", + "file": "reference/operators/index.mdx" + }, + { + "route": "/reference/operators/distributed-ddl", + "title": "Page for Distributed DDL", + "file": "reference/operators/distributed-ddl.mdx" + }, + { + "route": "/reference/operators/exists", + "title": "EXISTS", + "file": "reference/operators/exists.mdx" + }, + { + "route": "/reference/settings", + "title": "Settings", + "file": "reference/settings/index.mdx" + }, + { + "route": "/reference/settings/formats", + "title": "Format Settings", + "file": "reference/settings/formats.mdx" + }, + { + "route": "/reference/settings/server-settings/settings", + "title": "Server Settings", + "file": "reference/settings/server-settings/settings.mdx" + }, + { + "route": "/reference/settings/session-settings", + "title": "Session Settings", + "file": "reference/settings/session-settings.mdx" + }, + { + "route": "/reference/statements", + "title": "ClickHouse SQL Statements", + "file": "reference/statements/index.mdx" + }, + { + "route": "/reference/statements/create/dictionary/attributes", + "title": "Dictionary attributes", + "file": "reference/statements/create/dictionary/attributes.mdx" + }, + { + "route": "/reference/statements/create/dictionary/embedded", + "title": "Embedded (geobase) dictionaries", + "file": "reference/statements/create/dictionary/embedded.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/hierarchical", + "title": "Hierarchical dictionaries", + "file": "reference/statements/create/dictionary/layouts/hierarchical.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/overview", + "title": "Dictionary layouts", + "file": "reference/statements/create/dictionary/layouts/overview.mdx" + }, + { + "route": "/reference/statements/create/dictionary/lifetime", + "title": "Refreshing dictionary data using LIFETIME", + "file": "reference/statements/create/dictionary/lifetime.mdx" + }, + { + "route": "/reference/statements/create/dictionary/sources/overview", + "title": "Dictionary Sources", + "file": "reference/statements/create/dictionary/sources/overview.mdx" + }, + { + "route": "/reference/syntax", + "title": "Syntax", + "file": "reference/syntax.mdx" + }, + { + "route": "/reference/system-tables/keeper_storage", + "title": "system.keeper_storage", + "file": "reference/system-tables/keeper_storage.mdx" + }, + { + "route": "/reference/system-tables/overview", + "title": "System Tables Overview", + "file": "reference/system-tables/overview.mdx" + }, + { + "route": "/reference/system-tables/system_warnings", + "title": "system.warnings", + "file": "reference/system-tables/system_warnings.mdx" + }, + { + "route": "/reference/system-tables/zookeeper_watches", + "title": "system.zookeeper_watches", + "file": "reference/system-tables/zookeeper_watches.mdx" + } + ], + "currentPagesWithSiteContentOutsideGenerated": [ + { + "route": "/reference/engines/database-engines", + "title": "Database Engines", + "file": "reference/engines/database-engines/index.mdx", + "siteContentCharacters": 365, + "siteContentExcerpt": "Database engines allow you to work with tables. By default, ClickHouse uses the [Atomic](/reference/engines/database-engines/atomic) database engine, which provides configurable [table engines](/reference/engines/table-e" + }, + { + "route": "/reference/engines/table-engines/integrations", + "title": "Table Engines for Integrations", + "file": "reference/engines/table-engines/integrations/index.mdx", + "siteContentCharacters": 550, + "siteContentExcerpt": "ClickHouse provides various means for integrating with external systems, including table engines. Like with all other table engines, the configuration is done using `CREATE TABLE` or `ALTER TABLE` queries. Then from a us" + }, + { + "route": "/reference/engines/table-engines/mergetree-family", + "title": "MergeTree Engine Family", + "file": "reference/engines/table-engines/mergetree-family/index.mdx", + "siteContentCharacters": 1297, + "siteContentExcerpt": "Table engines from the MergeTree family are the core of ClickHouse data storage capabilities. They provide most features for resilience and high-performance data retrieval: columnar storage, custom partitioning, sparse p" + }, + { + "route": "/reference/engines/table-engines/special", + "title": "Special table engines", + "file": "reference/engines/table-engines/special/index.mdx", + "siteContentCharacters": 487, + "siteContentExcerpt": "There are three main categories of table engines: - [MergeTree engine family](/reference/engines/table-engines/mergetree-family/index) for main production use. - [Log engine family](/reference/engines/table-engines/log-f" + }, + { + "route": "/reference/functions/aggregate-functions/approxtopk", + "title": "approx_top_k", + "file": "reference/functions/aggregate-functions/approxtopk.mdx", + "siteContentCharacters": 215, + "siteContentExcerpt": "**See Also** - [topK](/reference/functions/aggregate-functions/topK) - [topKWeighted](/reference/functions/aggregate-functions/topKWeighted) - [approx_top_sum](/reference/functions/aggregate-functions/approxtopsum)" + }, + { + "route": "/reference/functions/aggregate-functions/approxtopsum", + "title": "approx_top_sum", + "file": "reference/functions/aggregate-functions/approxtopsum.mdx", + "siteContentCharacters": 211, + "siteContentExcerpt": "**See Also** - [topK](/reference/functions/aggregate-functions/topK) - [topKWeighted](/reference/functions/aggregate-functions/topKWeighted) - [approx_top_k](/reference/functions/aggregate-functions/approxtopk)" + }, + { + "route": "/reference/functions/aggregate-functions/argAndMax", + "title": "argAndMax", + "file": "reference/functions/aggregate-functions/argAndMax.mdx", + "siteContentCharacters": 112, + "siteContentExcerpt": "**See also** - [argMax](/reference/functions/aggregate-functions/argMax) - [Tuple](/reference/data-types/tuple)" + }, + { + "route": "/reference/functions/aggregate-functions/argAndMin", + "title": "argAndMin", + "file": "reference/functions/aggregate-functions/argAndMin.mdx", + "siteContentCharacters": 112, + "siteContentExcerpt": "**See also** - [argMin](/reference/functions/aggregate-functions/argMin) - [Tuple](/reference/data-types/tuple)" + }, + { + "route": "/reference/functions/aggregate-functions/argMax", + "title": "argMax", + "file": "reference/functions/aggregate-functions/argMax.mdx", + "siteContentCharacters": 15, + "siteContentExcerpt": "Alias: `max_by`" + }, + { + "route": "/reference/functions/aggregate-functions/argMin", + "title": "argMin", + "file": "reference/functions/aggregate-functions/argMin.mdx", + "siteContentCharacters": 15, + "siteContentExcerpt": "Alias: `min_by`" + }, + { + "route": "/reference/functions/aggregate-functions/deltaSum", + "title": "deltaSum", + "file": "reference/functions/aggregate-functions/deltaSum.mdx", + "siteContentCharacters": 111, + "siteContentExcerpt": "**See also** - [`runningDifference`](/reference/functions/regular-functions/other-functions#runningDifference)" + }, + { + "route": "/reference/functions/aggregate-functions/groupFormat", + "title": "groupFormat", + "file": "reference/functions/aggregate-functions/groupFormat.mdx", + "siteContentCharacters": 2178, + "siteContentExcerpt": "Formats rows in each group using an output format and returns the formatted data as a string. This is similar to `formatRow`, but works on the whole group and can use block-based formats. All rows of each group" + }, + { + "route": "/reference/functions/aggregate-functions/kolmogorovSmirnovTest", + "title": "kolmogorovSmirnovTest", + "file": "reference/functions/aggregate-functions/kolmogorovSmirnovTest.mdx", + "siteContentCharacters": 104, + "siteContentExcerpt": "**See Also** - [Kolmogorov-Smirnov'test](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test)" + }, + { + "route": "/reference/functions/aggregate-functions/mannWhitneyUTest", + "title": "mannWhitneyUTest", + "file": "reference/functions/aggregate-functions/mannWhitneyUTest.mdx", + "siteContentCharacters": 171, + "siteContentExcerpt": "**See Also** - [Mann–Whitney U test](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) - [Stochastic ordering](https://en.wikipedia.org/wiki/Stochastic_ordering)" + }, + { + "route": "/reference/functions/aggregate-functions/quantile", + "title": "quantile", + "file": "reference/functions/aggregate-functions/quantile.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileBFloat16", + "title": "quantileBFloat16", + "file": "reference/functions/aggregate-functions/quantileBFloat16.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileddsketch", + "title": "quantileDD", + "file": "reference/functions/aggregate-functions/quantileddsketch.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileDeterministic", + "title": "quantileDeterministic", + "file": "reference/functions/aggregate-functions/quantileDeterministic.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileExact", + "title": "quantileExact Functions", + "file": "reference/functions/aggregate-functions/quantileExact.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileExactWeighted", + "title": "quantileExactWeighted", + "file": "reference/functions/aggregate-functions/quantileExactWeighted.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileExactWeightedInterpolated", + "title": "quantileExactWeightedInterpolated", + "file": "reference/functions/aggregate-functions/quantileExactWeightedInterpolated.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileGK", + "title": "quantileGK", + "file": "reference/functions/aggregate-functions/quantileGK.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileInterpolatedWeighted", + "title": "quantileInterpolatedWeighted", + "file": "reference/functions/aggregate-functions/quantileInterpolatedWeighted.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantilePrometheusHistogram", + "title": "quantilePrometheusHistogram", + "file": "reference/functions/aggregate-functions/quantilePrometheusHistogram.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantilesTimingWeighted", + "title": "quantilesTimingWeighted", + "file": "reference/functions/aggregate-functions/quantilesTimingWeighted.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileTDigest", + "title": "quantileTDigest", + "file": "reference/functions/aggregate-functions/quantileTDigest.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileTDigestWeighted", + "title": "quantileTDigestWeighted", + "file": "reference/functions/aggregate-functions/quantileTDigestWeighted.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/quantileTiming", + "title": "quantileTiming", + "file": "reference/functions/aggregate-functions/quantileTiming.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "**See Also** - [median](/reference/functions/aggregate-functions/median) - [quantiles](/reference/functions/aggregate-functions/quantiles)" + }, + { + "route": "/reference/functions/aggregate-functions/rankCorr", + "title": "rankCorr", + "file": "reference/functions/aggregate-functions/rankCorr.mdx", + "siteContentCharacters": 130, + "siteContentExcerpt": "**See Also** - [Spearman's rank correlation coefficient](https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient)" + }, + { + "route": "/reference/functions/aggregate-functions/reference-index", + "title": "Aggregate Functions", + "file": "reference/functions/aggregate-functions/reference-index.mdx", + "siteContentCharacters": 381, + "siteContentExcerpt": "ClickHouse supports all standard SQL aggregate functions ([sum](/reference/functions/aggregate-functions/sum), [avg](/reference/functions/aggregate-functions/avg), [min](/reference/functions/aggregate-functions/min), [ma" + }, + { + "route": "/reference/functions/aggregate-functions/stochasticLinearRegression", + "title": "stochasticLinearRegression", + "file": "reference/functions/aggregate-functions/stochasticLinearRegression.mdx", + "siteContentCharacters": 291, + "siteContentExcerpt": "**See Also** - [stochasticLogisticRegression](/reference/functions/aggregate-functions/stochasticLogisticRegression) - [Difference between linear and logistic regressions](https://stackoverflow.com/questions/12146914/wha" + }, + { + "route": "/reference/functions/aggregate-functions/stochasticLogisticRegression", + "title": "stochasticLogisticRegression", + "file": "reference/functions/aggregate-functions/stochasticLogisticRegression.mdx", + "siteContentCharacters": 290, + "siteContentExcerpt": "**See Also** - [stochasticLinearRegression](/reference/functions/aggregate-functions/stochasticLogisticRegression) - [Difference between linear and logistic regressions.](https://stackoverflow.com/questions/12146914/what" + }, + { + "route": "/reference/functions/aggregate-functions/studentTTest", + "title": "studentTTest", + "file": "reference/functions/aggregate-functions/studentTTest.mdx", + "siteContentCharacters": 161, + "siteContentExcerpt": "**See Also** - [Student's t-test](https://en.wikipedia.org/wiki/Student%27s_t-test) - [welchTTest function](/reference/functions/aggregate-functions/welchTTest)" + }, + { + "route": "/reference/functions/aggregate-functions/studentTTestOneSample", + "title": "studentTTestOneSample", + "file": "reference/functions/aggregate-functions/studentTTestOneSample.mdx", + "siteContentCharacters": 165, + "siteContentExcerpt": "**See Also** - [Student's t-test](https://en.wikipedia.org/wiki/Student%27s_t-test) - [studentTTest function](/reference/functions/aggregate-functions/studentTTest)" + }, + { + "route": "/reference/functions/aggregate-functions/sumCount", + "title": "sumCount", + "file": "reference/functions/aggregate-functions/sumCount.mdx", + "siteContentCharacters": 135, + "siteContentExcerpt": "**See also** - [optimize_syntax_fuse_functions](/reference/settings/session-settings/optimize#optimize_syntax_fuse_functions) setting." + }, + { + "route": "/reference/functions/aggregate-functions/sumMap", + "title": "sumMap", + "file": "reference/functions/aggregate-functions/sumMap.mdx", + "siteContentCharacters": 192, + "siteContentExcerpt": "**See Also** - [Map combinator for Map datatype](/reference/functions/aggregate-functions/combinators#-map) - [sumMapWithOverflow](/reference/functions/aggregate-functions/sumMapWithOverflow)" + }, + { + "route": "/reference/functions/aggregate-functions/sumMapWithOverflow", + "title": "sumMapWithOverflow", + "file": "reference/functions/aggregate-functions/sumMapWithOverflow.mdx", + "siteContentCharacters": 77, + "siteContentExcerpt": "**See Also** - [sumMap](/reference/functions/aggregate-functions/sumMap)" + }, + { + "route": "/reference/functions/aggregate-functions/topK", + "title": "topK", + "file": "reference/functions/aggregate-functions/topK.mdx", + "siteContentCharacters": 229, + "siteContentExcerpt": "**See Also** - [topKWeighted](/reference/functions/aggregate-functions/topKWeighted) - [approx_top_k](/reference/functions/aggregate-functions/approxtopk) - [approx_top_sum](/reference/functions/aggregate-functions/appro" + }, + { + "route": "/reference/functions/aggregate-functions/topKWeighted", + "title": "topKWeighted", + "file": "reference/functions/aggregate-functions/topKWeighted.mdx", + "siteContentCharacters": 213, + "siteContentExcerpt": "**See Also** - [topK](/reference/functions/aggregate-functions/topK) - [approx_top_k](/reference/functions/aggregate-functions/approxtopk) - [approx_top_sum](/reference/functions/aggregate-functions/approxtopsum)" + }, + { + "route": "/reference/functions/aggregate-functions/uniq", + "title": "uniq", + "file": "reference/functions/aggregate-functions/uniq.mdx", + "siteContentCharacters": 365, + "siteContentExcerpt": "**See Also** - [uniqCombined](/reference/functions/aggregate-functions/uniqCombined) - [uniqCombined64](/reference/functions/aggregate-functions/uniqCombined64) - [uniqHLL12](/reference/functions/aggregate-functions/uniq" + }, + { + "route": "/reference/functions/aggregate-functions/uniqCombined", + "title": "uniqCombined", + "file": "reference/functions/aggregate-functions/uniqCombined.mdx", + "siteContentCharacters": 349, + "siteContentExcerpt": "**See Also** - [uniq](/reference/functions/aggregate-functions/uniq) - [uniqCombined64](/reference/functions/aggregate-functions/uniqCombined64) - [uniqHLL12](/reference/functions/aggregate-functions/uniqHLL12) - [uniqEx" + }, + { + "route": "/reference/functions/aggregate-functions/uniqCombined64", + "title": "uniqCombined64", + "file": "reference/functions/aggregate-functions/uniqCombined64.mdx", + "siteContentCharacters": 345, + "siteContentExcerpt": "**See Also** - [uniq](/reference/functions/aggregate-functions/uniq) - [uniqCombined](/reference/functions/aggregate-functions/uniqCombined) - [uniqHLL12](/reference/functions/aggregate-functions/uniqHLL12) - [uniqExact]" + }, + { + "route": "/reference/functions/aggregate-functions/uniqExact", + "title": "uniqExact", + "file": "reference/functions/aggregate-functions/uniqExact.mdx", + "siteContentCharacters": 279, + "siteContentExcerpt": "**See Also** - [uniq](/reference/functions/aggregate-functions/uniq) - [uniqCombined](/reference/functions/aggregate-functions/uniqCombined) - [uniqHLL12](/reference/functions/aggregate-functions/uniqHLL12) - [uniqTheta]" + }, + { + "route": "/reference/functions/aggregate-functions/uniqHLL12", + "title": "uniqHLL12", + "file": "reference/functions/aggregate-functions/uniqHLL12.mdx", + "siteContentCharacters": 279, + "siteContentExcerpt": "**See Also** - [uniq](/reference/functions/aggregate-functions/uniq) - [uniqCombined](/reference/functions/aggregate-functions/uniqCombined) - [uniqExact](/reference/functions/aggregate-functions/uniqExact) - [uniqTheta]" + }, + { + "route": "/reference/functions/aggregate-functions/uniqthetasketch", + "title": "uniqTheta", + "file": "reference/functions/aggregate-functions/uniqthetasketch.mdx", + "siteContentCharacters": 349, + "siteContentExcerpt": "**See Also** - [uniq](/reference/functions/aggregate-functions/uniq) - [uniqCombined](/reference/functions/aggregate-functions/uniqCombined) - [uniqCombined64](/reference/functions/aggregate-functions/uniqCombined64) - [" + }, + { + "route": "/reference/functions/aggregate-functions/welchTTest", + "title": "welchTTest", + "file": "reference/functions/aggregate-functions/welchTTest.mdx", + "siteContentCharacters": 161, + "siteContentExcerpt": "**See Also** - [Welch's t-test](https://en.wikipedia.org/wiki/Welch%27s_t-test) - [studentTTest function](/reference/functions/aggregate-functions/studentTTest)" + }, + { + "route": "/reference/functions/regular-functions/ai-functions", + "title": "AI Functions", + "file": "reference/functions/regular-functions/ai-functions.mdx", + "siteContentCharacters": 10569, + "siteContentExcerpt": "AI Functions are built-in functions in ClickHouse that you can use to call AI or generate embeddings to work with your data, extract information, classify data, etc... AI functions are beta. AI functions can retur" + }, + { + "route": "/reference/functions/regular-functions/arithmetic-functions", + "title": "Arithmetic Functions", + "file": "reference/functions/regular-functions/arithmetic-functions.mdx", + "siteContentCharacters": 1959, + "siteContentExcerpt": "## Overview {#overview} Arithmetic functions work for any two operands of type `UInt8`, `UInt16`, `UInt32`, `UInt64`, `Int8`, `Int16`, `Int32`, `Int64`, `Float32`, or `Float64`. Before performing the operation, both oper" + }, + { + "route": "/reference/functions/regular-functions/array-functions", + "title": "Array Functions", + "file": "reference/functions/regular-functions/array-functions.mdx", + "siteContentCharacters": 180, + "siteContentExcerpt": "## Distance functions {#distance-functions} All supported functions are described in [distance functions documentation](/reference/functions/regular-functions/distance-functions)." + }, + { + "route": "/reference/functions/regular-functions/bit-functions", + "title": "Bit Functions", + "file": "reference/functions/regular-functions/bit-functions.mdx", + "siteContentCharacters": 425, + "siteContentExcerpt": "Bit functions work for any pair of types from `UInt8`, `UInt16`, `UInt32`, `UInt64`, `Int8`, `Int16`, `Int32`, `Int64`, `Float32`, or `Float64`. Some functions support `String` and `FixedString` types. The result type is" + }, + { + "route": "/reference/functions/regular-functions/bitmap-functions", + "title": "Bitmap Functions", + "file": "reference/functions/regular-functions/bitmap-functions.mdx", + "siteContentCharacters": 182, + "siteContentExcerpt": "Bitmaps can be constructed in two ways. The first way is constructed by aggregation function groupBitmap with `-State`, the other way is to constructed a bitmap from an Array object." + }, + { + "route": "/reference/functions/regular-functions/comparison-functions", + "title": "Comparison Functions", + "file": "reference/functions/regular-functions/comparison-functions.mdx", + "siteContentCharacters": 977, + "siteContentExcerpt": "## Comparison rules {#comparison-rules} The comparison functions below return `0` or `1` with type [UInt8](/reference/data-types/int-uint). Only values within the same group can be compared (e.g. `UInt16` and `UInt64`) b" + }, + { + "route": "/reference/functions/regular-functions/conditional-functions", + "title": "Conditional Functions", + "file": "reference/functions/regular-functions/conditional-functions.mdx", + "siteContentCharacters": 6591, + "siteContentExcerpt": "## Overview {#overview} ### Using Conditional Results Directly {#using-conditional-results-directly} Conditionals always result to `0`, `1` or `NULL`. So you can use conditional results directly like this: ```sql SELECT " + }, + { + "route": "/reference/functions/regular-functions/date-time-functions", + "title": "Functions for Working with Dates and Times", + "file": "reference/functions/regular-functions/date-time-functions.mdx", + "siteContentCharacters": 810, + "siteContentExcerpt": "Most functions in this section accept an optional time zone argument, e.g. `Europe/Amsterdam`. In this case, the time zone is the specified one instead of the local (default) one. **Example** ```sql SELECT toDateTime('20" + }, + { + "route": "/reference/functions/regular-functions/embedded-dict-functions", + "title": "Functions for Working with Embedded Dictionaries", + "file": "reference/functions/regular-functions/embedded-dict-functions.mdx", + "siteContentCharacters": 21606, + "siteContentExcerpt": " In order for the functions below to work, the server config must specify the paths and addresses for getting all the embedded dictionaries. The dictionaries are loaded at the first call of any of these functions. " + }, + { + "route": "/reference/functions/regular-functions/encryption-functions", + "title": "Encryption functions", + "file": "reference/functions/regular-functions/encryption-functions.mdx", + "siteContentCharacters": 334, + "siteContentExcerpt": "These functions implement encryption and decryption of data with AES (Advanced Encryption Standard) algorithm. The key length depends on the encryption mode: `16`, `24`, and `32` bytes long for `-128-`, `-196-`, and `-25" + }, + { + "route": "/reference/functions/regular-functions/ext-dict-functions", + "title": "Functions for Working with Dictionaries", + "file": "reference/functions/regular-functions/ext-dict-functions.mdx", + "siteContentCharacters": 7528, + "siteContentExcerpt": " For dictionaries created with [DDL queries](/reference/statements/create/dictionary), the `dict_name` parameter must be fully specified, like `.`. Otherwise, the current database is used. The documentation below is generated from the `system.functions` system table ## Related resources {#related-resources} - [Financial functions in ClickHouse video](https://www.youtube.com/watch?v=BePLPVa0w" + }, + { + "route": "/reference/functions/regular-functions/hash-functions", + "title": "Hash Functions", + "file": "reference/functions/regular-functions/hash-functions.mdx", + "siteContentCharacters": 627, + "siteContentExcerpt": "Hash functions can be used for the deterministic pseudo-random shuffling of elements. Simhash is a hash function, which returns close hash values for close (similar) arguments. Most hash functions accept any number of ar" + }, + { + "route": "/reference/functions/regular-functions/introspection", + "title": "Introspection Functions", + "file": "reference/functions/regular-functions/introspection.mdx", + "siteContentCharacters": 757, + "siteContentExcerpt": "You can use functions described in this chapter to introspect [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) and [DWARF](https://en.wikipedia.org/wiki/DWARF) for query profiling. These functio" + }, + { + "route": "/reference/functions/regular-functions/json-functions", + "title": "JSON Functions", + "file": "reference/functions/regular-functions/json-functions.mdx", + "siteContentCharacters": 5425, + "siteContentExcerpt": "## Types of JSON functions {#types-of-functions} There are two sets of functions to parse JSON: - [`simpleJSON*` (`visitParam*`)](#simplejson-visitparam-functions) which is made for parsing a limited subset of JSON extre" + }, + { + "route": "/reference/functions/regular-functions/logical-functions", + "title": "Logical functions", + "file": "reference/functions/regular-functions/logical-functions.mdx", + "siteContentCharacters": 270, + "siteContentExcerpt": "The functions below perform logical operations on arguments of arbitrary numeric types. They return either `0` or `1` as [`UInt8`](/reference/data-types/int-uint) or in some cases `NULL`. Zero as an argument is considere" + }, + { + "route": "/reference/functions/regular-functions/machine-learning-functions", + "title": "Machine Learning Functions", + "file": "reference/functions/regular-functions/machine-learning-functions.mdx", + "siteContentCharacters": 7350, + "siteContentExcerpt": "## evalMLMethod {#evalmlmethod} Prediction using fitted regression models uses `evalMLMethod` function. See link in `linearRegression`. ## stochasticLinearRegression {#stochasticlinearregression} The [stochasticLinearReg" + }, + { + "route": "/reference/functions/regular-functions/numeric-indexed-vector-functions", + "title": "NumericIndexedVector Functions", + "file": "reference/functions/regular-functions/numeric-indexed-vector-functions.mdx", + "siteContentCharacters": 7137, + "siteContentExcerpt": "NumericIndexedVector is an abstract data structure that encapsulates a vector and implements vector aggregating and pointwise operations. Bit-Sliced Index is its storage method. For theoretical basis and usage scenarios," + }, + { + "route": "/reference/functions/regular-functions/other-functions", + "title": "Other functions", + "file": "reference/functions/regular-functions/other-functions.mdx", + "siteContentCharacters": 102, + "siteContentExcerpt": " The function documentation below is generated from the `system.functions` system table. " + }, + { + "route": "/reference/functions/regular-functions/random-functions", + "title": "Functions for generating random numbers", + "file": "reference/functions/regular-functions/random-functions.mdx", + "siteContentCharacters": 772, + "siteContentExcerpt": "All functions in this section accept zero or one arguments. The only use of the argument (if provided) is to prevent [common subexpression elimination](/reference/functions/regular-functions/overview#common-subexpression" + }, + { + "route": "/reference/functions/regular-functions/rounding-functions", + "title": "Rounding functions", + "file": "reference/functions/regular-functions/rounding-functions.mdx", + "siteContentCharacters": 92, + "siteContentExcerpt": " The documentation below is generated from the `system.functions` system table " + }, + { + "route": "/reference/functions/regular-functions/splitting-merging-functions", + "title": "Functions for splitting strings", + "file": "reference/functions/regular-functions/splitting-merging-functions.mdx", + "siteContentCharacters": 93, + "siteContentExcerpt": " The documentation below is generated from the `system.functions` system table. " + }, + { + "route": "/reference/functions/regular-functions/string-functions", + "title": "Functions for working with strings", + "file": "reference/functions/regular-functions/string-functions.mdx", + "siteContentCharacters": 317, + "siteContentExcerpt": "Functions for [searching](/reference/functions/regular-functions/string-search-functions) in strings and for [replacing](/reference/functions/regular-functions/string-replace-functions) in strings are described separatel" + }, + { + "route": "/reference/functions/regular-functions/string-replace-functions", + "title": "Functions for string replacement", + "file": "reference/functions/regular-functions/string-replace-functions.mdx", + "siteContentCharacters": 310, + "siteContentExcerpt": "[General strings functions](/reference/functions/regular-functions/string-functions) and [functions for searching in strings](/reference/functions/regular-functions/string-search-functions) are described separately. Case-insensitive search follows the lowercase-uppercase rules of the Eng" + }, + { + "route": "/reference/functions/regular-functions/time-series-functions", + "title": "Functions for working with time series", + "file": "reference/functions/regular-functions/time-series-functions.mdx", + "siteContentCharacters": 309, + "siteContentExcerpt": "The functions below are designed to be used with `timeSeries*()` aggregate functions like [`timeSeriesInstantRateToGrid`](/reference/functions/aggregate-functions/timeSeriesInstantRateToGrid), [`timeSeriesLastToGrid`](/r" + }, + { + "route": "/reference/functions/regular-functions/time-window-functions", + "title": "Time window functions", + "file": "reference/functions/regular-functions/time-window-functions.mdx", + "siteContentCharacters": 342, + "siteContentExcerpt": " Time window functions return the inclusive lower and exclusive upper bound of the corresponding window. The functions for working with time windows are listed below: ## Rela" + }, + { + "route": "/reference/functions/regular-functions/tuple-functions", + "title": "Tuple functions", + "file": "reference/functions/regular-functions/tuple-functions.mdx", + "siteContentCharacters": 1826, + "siteContentExcerpt": " The documentation below is generated from the `system.functions` system table. ## untuple {#untuple} Performs syntactic substitution of [tuple](/reference/data-types/tuple) elements in the call location. T" + }, + { + "route": "/reference/functions/regular-functions/type-conversion-functions", + "title": "Type conversion functions", + "file": "reference/functions/regular-functions/type-conversion-functions.mdx", + "siteContentCharacters": 5186, + "siteContentExcerpt": "## Common issues with data conversion {#common-issues-with-data-conversion} ClickHouse generally uses the [same behavior as C++ programs](https://en.cppreference.com/w/cpp/language/implicit_conversion). `to` functi" + }, + { + "route": "/reference/functions/regular-functions/ulid-functions", + "title": "Functions for working with ULIDs", + "file": "reference/functions/regular-functions/ulid-functions.mdx", + "siteContentCharacters": 183, + "siteContentExcerpt": " The documentation below is generated from the `system.functions` system table. ## See also {#see-also} - [UUID](/reference/functions/regular-functions/uuid-functions)" + }, + { + "route": "/reference/functions/regular-functions/uniqtheta-functions", + "title": "uniqTheta Functions", + "file": "reference/functions/regular-functions/uniqtheta-functions.mdx", + "siteContentCharacters": 2680, + "siteContentExcerpt": "uniqTheta functions work for two uniqThetaSketch objects to do set operation calculations such as ∪ / ∩ / × (union/intersect/not), it is to return a new uniqThetaSketch object contain the result. A uniqThetaSketch object" + }, + { + "route": "/reference/functions/regular-functions/url-functions", + "title": "Functions for working with URLs", + "file": "reference/functions/regular-functions/url-functions.mdx", + "siteContentCharacters": 1544, + "siteContentExcerpt": "## Overview {#overview} The functions mentioned in this section are optimized for maximum performance and for the most part do not follow the RFC-3986 standard. Functions which implement RFC-3986 have `RFC` append" + }, + { + "route": "/reference/functions/regular-functions/uuid-functions", + "title": "Functions for Working with UUIDs", + "file": "reference/functions/regular-functions/uuid-functions.mdx", + "siteContentCharacters": 2719, + "siteContentExcerpt": "## UUIDv7 generation {#uuidv7-generation} The generated UUID contains a 48-bit timestamp in Unix milliseconds, followed by version \"7\" (4 bits), a counter (42 bits) to distinguish UUIDs within a millisecond (including a " + }, + { + "route": "/reference/settings/beta-and-experimental-features", + "title": "Beta and experimental features", + "file": "reference/settings/beta-and-experimental-features.mdx", + "siteContentCharacters": 1893, + "siteContentExcerpt": "Because ClickHouse is open-source, it receives many contributions not only from ClickHouse employees but also from the community. These contributions are often developed at different speeds; certain features may require " + }, + { + "route": "/reference/settings/merge-tree-settings", + "title": "MergeTree tables settings", + "file": "reference/settings/merge-tree-settings.mdx", + "siteContentCharacters": 1138, + "siteContentExcerpt": "System table `system.merge_tree_settings` shows the globally set MergeTree settings. MergeTree settings can be set in the `merge_tree` section of the server config file, or specified for each `MergeTree` table individual" + }, + { + "route": "/reference/system-tables/aggregate_function_combinators", + "title": "system.aggregate_function_combinators", + "file": "reference/system-tables/aggregate_function_combinators.mdx", + "siteContentCharacters": 194, + "siteContentExcerpt": "## Description {#description} Contains a list of all available aggregate function combinators, which could be applied to aggregate functions and change the way they work. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/aggregated_zookeeper_log", + "title": "system.aggregated_zookeeper_log", + "file": "reference/system-tables/aggregated_zookeeper_log.mdx", + "siteContentCharacters": 954, + "siteContentExcerpt": "## Description {#description} This table contains aggregated statistics of ZooKeeper operations (e.g. number of operations, average latency, errors) grouped by `(session_id, parent_path, operation, component, is_subreque" + }, + { + "route": "/reference/system-tables/asynchronous_insert_log", + "title": "system.asynchronous_insert_log", + "file": "reference/system-tables/asynchronous_insert_log.mdx", + "siteContentCharacters": 2017, + "siteContentExcerpt": " ## Description {#description} Contains information about async inserts. Each entry represents an insert query buffered into an async insert query. To start logging configure parameters in the [asynchr" + }, + { + "route": "/reference/system-tables/asynchronous_inserts", + "title": "system.asynchronous_inserts", + "file": "reference/system-tables/asynchronous_inserts.mdx", + "siteContentCharacters": 974, + "siteContentExcerpt": " ## Description {#description} Contains information about pending asynchronous inserts in queue. ## Columns {#columns} ## Example {#example} ```sql title=\"Query\" SELECT * FROM system.asynchronous_inser" + }, + { + "route": "/reference/system-tables/asynchronous_loader", + "title": "system.asynchronous_loader", + "file": "reference/system-tables/asynchronous_loader.mdx", + "siteContentCharacters": 3150, + "siteContentExcerpt": " ## Description {#description} Contains information and status for recent asynchronous jobs (e.g. for tables loading). The table contains a row for every job. There is a tool for visualizing informatio" + }, + { + "route": "/reference/system-tables/asynchronous_metric_log", + "title": "system.asynchronous_metric_log", + "file": "reference/system-tables/asynchronous_metric_log.mdx", + "siteContentCharacters": 2042, + "siteContentExcerpt": " ## Description {#description} Contains the historical values for `system.asynchronous_metrics`, which are saved once per time interval (one second by default). Enabled by default. Key-value metrics of" + }, + { + "route": "/reference/system-tables/asynchronous_metrics", + "title": "system.asynchronous_metrics", + "file": "reference/system-tables/asynchronous_metrics.mdx", + "siteContentCharacters": 73425, + "siteContentExcerpt": " ## Description {#description} Contains metrics that are calculated periodically in the background. For example, the amount of RAM in use. A metric is either scalar (a single number in the `value` colu" + }, + { + "route": "/reference/system-tables/azure_queue_log", + "title": "system.azure_queue_log", + "file": "reference/system-tables/azure_queue_log.mdx", + "siteContentCharacters": 151, + "siteContentExcerpt": "Contains log entries with information about files processed by the AzureQueue engine. It is safe to truncate or drop this table at any time. Columns:" + }, + { + "route": "/reference/system-tables/azure_queue_metadata", + "title": "system.azure_queue_metadata", + "file": "reference/system-tables/azure_queue_metadata.mdx", + "siteContentCharacters": 325, + "siteContentExcerpt": "## Description {#description} Contains the current number of processed, processing and failed nodes in keeper for each AzureQueue metadata object and, on demand, their contents. Unlike system.azure_queue_metadata_cache, " + }, + { + "route": "/reference/system-tables/azure_queue_metadata_cache", + "title": "system.azure_queue_metadata_cache", + "file": "reference/system-tables/azure_queue_metadata_cache.mdx", + "siteContentCharacters": 140, + "siteContentExcerpt": "## Description {#description} Contains in-memory state of AzureQueue metadata and currently processed rows per file. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/azure_queue_settings", + "title": "system.azure_queue_settings", + "file": "reference/system-tables/azure_queue_settings.mdx", + "siteContentCharacters": 211, + "siteContentExcerpt": "## Description {#description} Contains information about settings of [AzureQueue](/reference/engines/table-engines/integrations/azure-queue) tables. Available from `24.10` server version. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/background_schedule_pool", + "title": "system.background_schedule_pool", + "file": "reference/system-tables/background_schedule_pool.mdx", + "siteContentCharacters": 941, + "siteContentExcerpt": " ## Description {#description} Contains information about tasks in background schedule pools. Background schedule pools are used for executing periodic tasks such as distributed sends, buffer flushes, " + }, + { + "route": "/reference/system-tables/background_schedule_pool_log", + "title": "system.background_schedule_pool_log", + "file": "reference/system-tables/background_schedule_pool_log.mdx", + "siteContentCharacters": 1383, + "siteContentExcerpt": " ## Description {#description} The `system.background_schedule_pool_log` table is created only if the [background_schedule_pool_log](/reference/settings/server-settings/settings/background-schedule#bac" + }, + { + "route": "/reference/system-tables/backup_log", + "title": "system.backup_log", + "file": "reference/system-tables/backup_log.mdx", + "siteContentCharacters": 5364, + "siteContentExcerpt": " ## Description {#description} Contains logging entries with information about `BACKUP` and `RESTORE` operations. ## Columns {#columns} ## Example {#example} ```sql BACKUP TABLE test_db.my_table TO Dis" + }, + { + "route": "/reference/system-tables/backups", + "title": "system.backups", + "file": "reference/system-tables/backups.mdx", + "siteContentCharacters": 2013, + "siteContentExcerpt": "## Description {#description} Contains a list of all `BACKUP` or `RESTORE` operations with their current states and other properties. Note, that table is not persistent and it shows only operations executed after the las" + }, + { + "route": "/reference/system-tables/blob_storage_log", + "title": "system.blob_storage_log", + "file": "reference/system-tables/blob_storage_log.mdx", + "siteContentCharacters": 1530, + "siteContentExcerpt": " ## Description {#description} Contains logging entries with information about various blob storage operations such as uploads and deletes. ## Columns {#columns} ## Example {#example} Suppose a blob st" + }, + { + "route": "/reference/system-tables/build_options", + "title": "system.build_options", + "file": "reference/system-tables/build_options.mdx", + "siteContentCharacters": 413, + "siteContentExcerpt": "## Description {#description} Contains information about the ClickHouse server's build options. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.build_options LIMIT 5 ``` ```text ┌─name────────────" + }, + { + "route": "/reference/system-tables/certificates", + "title": "system.certificates", + "file": "reference/system-tables/certificates.mdx", + "siteContentCharacters": 122, + "siteContentExcerpt": "## Description {#description} Contains information about available certificates and their sources. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/clusters", + "title": "system.clusters", + "file": "reference/system-tables/clusters.mdx", + "siteContentCharacters": 1681, + "siteContentExcerpt": "## Description {#description} Contains information about clusters available in the config file and the servers in them. ## Columns {#Columns} ## Example {#example} ```sql title=\"Query\" SELECT * FROM system.clusters LIMIT" + }, + { + "route": "/reference/system-tables/codecs", + "title": "system.codecs", + "file": "reference/system-tables/codecs.mdx", + "siteContentCharacters": 660, + "siteContentExcerpt": "## Description {#description} Contains information about compression and encryption codecs. You can use this table to get information about the available compression and encryption codecs ## Columns {#columns} ## Example" + }, + { + "route": "/reference/system-tables/collations", + "title": "system.collations", + "file": "reference/system-tables/collations.mdx", + "siteContentCharacters": 137, + "siteContentExcerpt": "## Description {#description} Contains a list of all available collations for alphabetical comparison of strings. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/columns", + "title": "system.columns", + "file": "reference/system-tables/columns.mdx", + "siteContentCharacters": 1759, + "siteContentExcerpt": "## Description {#description} Contains information about columns in all tables. You can use this table to get information similar to the [DESCRIBE TABLE](/reference/statements/describe-table) query, but for multiple tabl" + }, + { + "route": "/reference/system-tables/completions", + "title": "system.completions", + "file": "reference/system-tables/completions.mdx", + "siteContentCharacters": 91, + "siteContentExcerpt": "## Description {#description} Contains a list of completion tokens. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/constraints", + "title": "system.constraints", + "file": "reference/system-tables/constraints.mdx", + "siteContentCharacters": 696, + "siteContentExcerpt": "## Description {#description} Contains information about existing constraints in all tables. Constraints defined on [temporary tables](/reference/statements/create/table/temporary-table) are visible in `system.constraint" + }, + { + "route": "/reference/system-tables/contributors", + "title": "system.contributors", + "file": "reference/system-tables/contributors.mdx", + "siteContentCharacters": 685, + "siteContentExcerpt": "## Description {#description} Contains information about contributors. The order is random at query execution time. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.contributors LIMIT 10 ``` ```tex" + }, + { + "route": "/reference/system-tables/crash_log", + "title": "system.crash_log", + "file": "reference/system-tables/crash_log.mdx", + "siteContentCharacters": 1175, + "siteContentExcerpt": " ## Description {#description} Contains information about stack traces for fatal errors. The table does not exist in the database by default, it is created only when fatal errors occur. ## Columns {#co" + }, + { + "route": "/reference/system-tables/current_roles", + "title": "system.current_roles", + "file": "reference/system-tables/current_roles.mdx", + "siteContentCharacters": 141, + "siteContentExcerpt": "## Description {#description} Contains active roles of a current user. `SET ROLE` changes the contents of this table. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/dashboards", + "title": "system.dashboards", + "file": "reference/system-tables/dashboards.mdx", + "siteContentCharacters": 2127, + "siteContentExcerpt": "## Description {#description} Contains queries used by `/dashboard` page accessible though [HTTP interface](/concepts/features/interfaces/http). This table can be useful for monitoring and troubleshooting. The table cont" + }, + { + "route": "/reference/system-tables/data_skipping_index_types", + "title": "system.data_skipping_index_types", + "file": "reference/system-tables/data_skipping_index_types.mdx", + "siteContentCharacters": 1263, + "siteContentExcerpt": "## Description {#description} Contains the list of data skipping index types supported by the server, along with embedded documentation for each type. A data skipping index type is specified in the `TYPE` of an `INDEX` d" + }, + { + "route": "/reference/system-tables/data_skipping_indices", + "title": "system.data_skipping_indices", + "file": "reference/system-tables/data_skipping_indices.mdx", + "siteContentCharacters": 991, + "siteContentExcerpt": "## Description {#description} Contains information about existing data skipping indices in all the tables. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.data_skipping_indices LIMIT 2 FORMAT Vert" + }, + { + "route": "/reference/system-tables/data_type_families", + "title": "system.data_type_families", + "file": "reference/system-tables/data_type_families.mdx", + "siteContentCharacters": 912, + "siteContentExcerpt": "## Description {#description} Contains information about supported [data types](/reference/data-types/index). ## Columns {#columns} ## Example {#example} ```sql SELECT name, case_insensitive, alias_to FROM system.data_ty" + }, + { + "route": "/reference/system-tables/database_engines", + "title": "system.database_engines", + "file": "reference/system-tables/database_engines.mdx", + "siteContentCharacters": 339, + "siteContentExcerpt": "## Description {#description} Contains the list of database engines supported by the server. ## Columns {#columns} ## Example {#example} ```sql title=\"Query\" SELECT name FROM system.database_engines WHERE name IN ('Atomi" + }, + { + "route": "/reference/system-tables/database_replicas", + "title": "system.database_replicas", + "file": "reference/system-tables/database_replicas.mdx", + "siteContentCharacters": 540, + "siteContentExcerpt": "## Description {#description} Contains information of each Replicated database replicas. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.database_replicas FORMAT Vertical; ``` ```text Row 1: ─────" + }, + { + "route": "/reference/system-tables/databases", + "title": "system.databases", + "file": "reference/system-tables/databases.mdx", + "siteContentCharacters": 2427, + "siteContentExcerpt": "## Description {#description} Contains information about the databases that are available to the current user. ## Columns {#columns} The `name` column from this system table is used for implementing the `SHOW DATABASES` " + }, + { + "route": "/reference/system-tables/dead_letter_queue", + "title": "system.dead_letter_queue", + "file": "reference/system-tables/dead_letter_queue.mdx", + "siteContentCharacters": 3731, + "siteContentExcerpt": "## Description {#description} Contains information about messages received via a streaming engine and parsed with errors. Currently implemented for Kafka and RabbitMQ. Logging is enabled by specifying `dead_letter_queue`" + }, + { + "route": "/reference/system-tables/delta_lake_metadata_log", + "title": "system.delta_lake_metadata_log", + "file": "reference/system-tables/delta_lake_metadata_log.mdx", + "siteContentCharacters": 151, + "siteContentExcerpt": "## Description {#description} Contains content of Delta metadata files. It is safe to truncate or drop this table at any time. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/delta_metadata_log", + "title": "system.delta_lake_metadata_log", + "file": "reference/system-tables/delta_metadata_log.mdx", + "siteContentCharacters": 1132, + "siteContentExcerpt": " ## Description {#purpose} The `system.delta_lake_metadata_log` table records metadata access and parsing events for Delta Lake tables read by ClickHouse. It provides detailed information about each me" + }, + { + "route": "/reference/system-tables/detached_parts", + "title": "system.detached_parts", + "file": "reference/system-tables/detached_parts.mdx", + "siteContentCharacters": 704, + "siteContentExcerpt": "## Description {#purpose} Contains information about detached parts of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables. The `reason` column specifies why the part was detached. For user-de" + }, + { + "route": "/reference/system-tables/detached_tables", + "title": "system.detached_tables", + "file": "reference/system-tables/detached_tables.mdx", + "siteContentCharacters": 1483, + "siteContentExcerpt": "## Description {#description} Contains information about each detached table. ## Columns {#columns} ## Notes {#notes} For `DatabaseMySQL` and `DatabasePostgreSQL`, these databases do not own the underlying data — it live" + }, + { + "route": "/reference/system-tables/dictionaries", + "title": "system.dictionaries", + "file": "reference/system-tables/dictionaries.mdx", + "siteContentCharacters": 1480, + "siteContentExcerpt": " ## Description {#description} Contains information about [dictionaries](/reference/statements/create/dictionary). ## Columns {#columns} ## Example {#example} Configure the dictionary: ```sql CREATE DI" + }, + { + "route": "/reference/system-tables/dictionary_layouts", + "title": "system.dictionary_layouts", + "file": "reference/system-tables/dictionary_layouts.mdx", + "siteContentCharacters": 1191, + "siteContentExcerpt": "## Description {#description} Contains the list of dictionary layouts supported by the server, along with embedded documentation for each layout. A dictionary layout determines how a dictionary is stored in memory (or on" + }, + { + "route": "/reference/system-tables/dictionary_sources", + "title": "system.dictionary_sources", + "file": "reference/system-tables/dictionary_sources.mdx", + "siteContentCharacters": 1051, + "siteContentExcerpt": "## Description {#description} Contains the list of dictionary sources supported by the server, along with embedded documentation for each source. A dictionary source determines where the dictionary data is loaded from; i" + }, + { + "route": "/reference/system-tables/dimensional_metrics", + "title": "system.dimensional_metrics", + "file": "reference/system-tables/dimensional_metrics.mdx", + "siteContentCharacters": 3770, + "siteContentExcerpt": " ## Description {#description} This table contains dimensional metrics that can be calculated instantly and exported in the Prometheus format. It is always up to date. ## Columns {#columns} ## Example " + }, + { + "route": "/reference/system-tables/disk_types", + "title": "system.disk_types", + "file": "reference/system-tables/disk_types.mdx", + "siteContentCharacters": 3229, + "siteContentExcerpt": "## Description {#description} Contains the list of disk types supported by the server, along with embedded documentation for each type. A disk type is specified in the `type` of a disk configuration and determines where " + }, + { + "route": "/reference/system-tables/disks", + "title": "system.disks", + "file": "reference/system-tables/disks.mdx", + "siteContentCharacters": 622, + "siteContentExcerpt": " ## Description {#description} Contains information about disks defined in the [server configuration](/reference/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes" + }, + { + "route": "/reference/system-tables/distributed_ddl_queue", + "title": "system.distributed_ddl_queue", + "file": "reference/system-tables/distributed_ddl_queue.mdx", + "siteContentCharacters": 1641, + "siteContentExcerpt": "## Description {#description} Contains information about [distributed ddl queries (ON CLUSTER clause)](/reference/statements/distributed-ddl) that were executed on a cluster. ## Columns {#columns} ## Example {#example} `" + }, + { + "route": "/reference/system-tables/distribution_queue", + "title": "system.distribution_queue", + "file": "reference/system-tables/distribution_queue.mdx", + "siteContentCharacters": 779, + "siteContentExcerpt": "## Description {#description} Contains information about local files that are in the queue to be sent to the shards. These local files contain new parts that are created by inserting new data into the Distributed table i" + }, + { + "route": "/reference/system-tables/dns_cache", + "title": "system.dns_cache", + "file": "reference/system-tables/dns_cache.mdx", + "siteContentCharacters": 886, + "siteContentExcerpt": " ## Description {#description} Contains information about cached DNS records. ## Columns {#columns} ## Example {#example} ```sql title=\"Query\" SELECT * FROM system.dns_cache; ``` | hostname | ip\\_addre" + }, + { + "route": "/reference/system-tables/documentation", + "title": "system.documentation", + "file": "reference/system-tables/documentation.mdx", + "siteContentCharacters": 6422, + "siteContentExcerpt": "## Description {#description} Collects the embedded documentation of the uniform components of the system into a single table. Every row corresponds to one entity (a function, a table engine, a data type, and so on) and " + }, + { + "route": "/reference/system-tables/dropped_tables", + "title": "system.dropped_tables", + "file": "reference/system-tables/dropped_tables.mdx", + "siteContentCharacters": 1305, + "siteContentExcerpt": "## Description {#description} Contains information about tables that drop table has been executed on but for which data cleanup has not yet been performed. ## Columns {#columns} This table lists only tables dropped from " + }, + { + "route": "/reference/system-tables/dropped_tables_parts", + "title": "system.dropped_tables_parts", + "file": "reference/system-tables/dropped_tables_parts.mdx", + "siteContentCharacters": 559, + "siteContentExcerpt": "## Description {#description} Contains information about parts of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) dropped tables from [system.dropped_tables](/reference/system-tables/dropped_tabl" + }, + { + "route": "/reference/system-tables/enabled_roles", + "title": "system.enabled_roles", + "file": "reference/system-tables/enabled_roles.mdx", + "siteContentCharacters": 181, + "siteContentExcerpt": "## Description {#description} Contains all active roles at the moment, including the current role of the current user and granted roles for the current role. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/error_log", + "title": "system.error_log", + "file": "reference/system-tables/error_log.mdx", + "siteContentCharacters": 1532, + "siteContentExcerpt": " ## Description {#description} Contains history of error values from table `system.errors`, periodically flushed to disk. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.error_l" + }, + { + "route": "/reference/system-tables/errors", + "title": "system.errors", + "file": "reference/system-tables/errors.mdx", + "siteContentCharacters": 1048, + "siteContentExcerpt": " ## Description {#description} Contains error codes with the number of times they have been triggered. To show all possible error codes, including ones which were not triggered, set setting [system_eve" + }, + { + "route": "/reference/system-tables/events", + "title": "system.events", + "file": "reference/system-tables/events.mdx", + "siteContentCharacters": 199687, + "siteContentExcerpt": " ## Description {#description} Contains information about the number of events that have occurred in the system. For example, in the table, you can find how many `SELECT` queries were processed since t" + }, + { + "route": "/reference/system-tables/fail_points", + "title": "system.fail_points", + "file": "reference/system-tables/fail_points.mdx", + "siteContentCharacters": 733, + "siteContentExcerpt": "## Description {#description} Contains a list of all available failpoints registered in the server, along with their type and whether they are currently enabled. Failpoints can be enabled and disabled at runtime using th" + }, + { + "route": "/reference/system-tables/filesystem_cache", + "title": "system.filesystem_cache", + "file": "reference/system-tables/filesystem_cache.mdx", + "siteContentCharacters": 136, + "siteContentExcerpt": "## Description {#description} Contains information about all entries inside filesystem cache for remote objects. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/filesystem_cache_log", + "title": "system.filesystem_cache_log", + "file": "reference/system-tables/filesystem_cache_log.mdx", + "siteContentCharacters": 165, + "siteContentExcerpt": "Contains a history of all events occurred with filesystem cache for objects on a remote filesystem. It is safe to truncate or drop this table at any time. Columns:" + }, + { + "route": "/reference/system-tables/filesystem_cache_settings", + "title": "system.filesystem_cache_settings", + "file": "reference/system-tables/filesystem_cache_settings.mdx", + "siteContentCharacters": 110, + "siteContentExcerpt": "## Description {#description} Contains information about all filesystem cache settings ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/filesystem_read_prefetches_log", + "title": "system.filesystem_read_prefetches_log", + "file": "reference/system-tables/filesystem_read_prefetches_log.mdx", + "siteContentCharacters": 175, + "siteContentExcerpt": "Contains a history of all prefetches done during reading from MergeTree tables backed by a remote filesystem. It is safe to truncate or drop this table at any time. Columns:" + }, + { + "route": "/reference/system-tables/formats", + "title": "system.formats", + "file": "reference/system-tables/formats.mdx", + "siteContentCharacters": 191, + "siteContentExcerpt": "## Description {#description} Contains a list of all the formats along with flags whether a format is suitable for input/output or whether it supports parallelization. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/functions", + "title": "system.functions", + "file": "reference/system-tables/functions.mdx", + "siteContentCharacters": 976, + "siteContentExcerpt": "## Description {#description} Contains information about normal and aggregate functions. ## Columns {#columns} ## Example {#example} ```sql title=\"Query\" SELECT name, is_aggregate, deterministic, case_insensitive, alias_" + }, + { + "route": "/reference/system-tables/grants", + "title": "system.grants", + "file": "reference/system-tables/grants.mdx", + "siteContentCharacters": 101, + "siteContentExcerpt": "## Description {#description} Privileges granted to ClickHouse user accounts. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/graphite_retentions", + "title": "system.graphite_retentions", + "file": "reference/system-tables/graphite_retentions.mdx", + "siteContentCharacters": 310, + "siteContentExcerpt": "## Description {#description} Contains information about parameters [graphite_rollup](/reference/settings/server-settings/settings/graphite#graphite_rollup) which are used in tables with [\\*GraphiteMergeTree](/reference/" + }, + { + "route": "/reference/system-tables/handlers", + "title": "system.handlers", + "file": "reference/system-tables/handlers.mdx", + "siteContentCharacters": 733, + "siteContentExcerpt": "## Description {#description} Contains a list of all SQL-defined HTTP handlers created via [`CREATE HANDLER`](/reference/statements/create/handler). Reading this table requires the `SHOW HANDLERS` privilege; without it t" + }, + { + "route": "/reference/system-tables/histogram_metric_log", + "title": "system.histogram_metric_log", + "file": "reference/system-tables/histogram_metric_log.mdx", + "siteContentCharacters": 620, + "siteContentExcerpt": " ## Description {#description} History of `system.histogram_metrics`. Snapshot taken every `collect_interval_milliseconds`, flushed to disk. ## Columns {#columns} ## Example {#example} ```sql SELECT ev" + }, + { + "route": "/reference/system-tables/histogram_metrics", + "title": "system.histogram_metrics", + "file": "reference/system-tables/histogram_metrics.mdx", + "siteContentCharacters": 3302, + "siteContentExcerpt": " ## Description {#description} This table contains histogram metrics that can be calculated instantly and exported in the Prometheus format. It is always up to date. Replaces the deprecated `system.lat" + }, + { + "route": "/reference/system-tables/hypothetical_indexes", + "title": "system.hypothetical_indexes", + "file": "reference/system-tables/hypothetical_indexes.mdx", + "siteContentCharacters": 1649, + "siteContentExcerpt": "Lists every hypothetical (what-if) skip index defined in the current session. See [`CREATE HYPOTHETICAL INDEX`](/reference/statements/hypothetical-index#create-hypothetical-index) and [`EXPLAIN WHATIF`](/reference/statem" + }, + { + "route": "/reference/system-tables/iceberg_files", + "title": "system.iceberg_files", + "file": "reference/system-tables/iceberg_files.mdx", + "siteContentCharacters": 297, + "siteContentExcerpt": "## Description {#description} This system table contains per-file metadata for Iceberg tables existing in ClickHouse, with one row per data or delete file referenced by the current snapshot of each table. It will be empt" + }, + { + "route": "/reference/system-tables/iceberg_history", + "title": "system.iceberg_history", + "file": "reference/system-tables/iceberg_history.mdx", + "siteContentCharacters": 212, + "siteContentExcerpt": "## Description {#description} This system table contains the snapshot history of Iceberg tables existing in ClickHouse. It will be empty if you don't have any Iceberg tables in ClickHouse. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/iceberg_metadata_log", + "title": "system.iceberg_metadata_log", + "file": "reference/system-tables/iceberg_metadata_log.mdx", + "siteContentCharacters": 3485, + "siteContentExcerpt": " ## Description {#description} The `system.iceberg_metadata_log` table records metadata access and parsing events for Iceberg tables read by ClickHouse. It provides detailed information about each meta" + }, + { + "route": "/reference/system-tables/information_schema", + "title": "INFORMATION_SCHEMA", + "file": "reference/system-tables/information_schema.mdx", + "siteContentCharacters": 16024, + "siteContentExcerpt": "`INFORMATION_SCHEMA` (or: `information_schema`) is a system database which provides a (somewhat) standardized, [DBMS-agnostic view](https://en.wikipedia.org/wiki/Information_schema) on metadata of database objects. The v" + }, + { + "route": "/reference/system-tables/instrumentation", + "title": "system.instrumentation", + "file": "reference/system-tables/instrumentation.mdx", + "siteContentCharacters": 1928, + "siteContentExcerpt": " ## Description {#description} Contains the instrumentation points using LLVM's XRay feature. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.instrumentation FORMAT Vertical; ``" + }, + { + "route": "/reference/system-tables/jemalloc_bins", + "title": "system.jemalloc_bins", + "file": "reference/system-tables/jemalloc_bins.mdx", + "siteContentCharacters": 1843, + "siteContentExcerpt": " ## Description {#description} Contains information about memory allocations done via jemalloc allocator in different size classes (bins) aggregated from all arenas. These statistics might not be absol" + }, + { + "route": "/reference/system-tables/jemalloc_profile_text", + "title": "system.jemalloc_profile_text", + "file": "reference/system-tables/jemalloc_profile_text.mdx", + "siteContentCharacters": 165, + "siteContentExcerpt": "## Description {#description} Displays the symbolized jemalloc heap profile. Run 'SYSTEM JEMALLOC FLUSH PROFILE' to generate a profile first. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/jemalloc_stats", + "title": "system.jemalloc_stats", + "file": "reference/system-tables/jemalloc_stats.mdx", + "siteContentCharacters": 164, + "siteContentExcerpt": "## Description {#description} Returns jemalloc statistics in a single row with a single column. Equivalent to SYSTEM JEMALLOC STATS command. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/kafka_consumers", + "title": "system.kafka_consumers", + "file": "reference/system-tables/kafka_consumers.mdx", + "siteContentCharacters": 1201, + "siteContentExcerpt": " ## Description {#description} Contains information about Kafka consumers. Applicable for [Kafka table engine](/reference/engines/table-engines/integrations/kafka) (native ClickHouse integration) ## Co" + }, + { + "route": "/reference/system-tables/keeper_changelogs", + "title": "system.keeper_changelogs", + "file": "reference/system-tables/keeper_changelogs.mdx", + "siteContentCharacters": 844, + "siteContentExcerpt": " ## Description {#description} This table does not exist if this node is not configured to run an in-process ClickHouse Keeper. It contains one row per Raft changelog file (`changelog__.bin[." + }, + { + "route": "/reference/system-tables/keeper_cluster", + "title": "system.keeper_cluster", + "file": "reference/system-tables/keeper_cluster.mdx", + "siteContentCharacters": 1132, + "siteContentExcerpt": " ## Description {#description} This table does not exist if this node is not configured to run an in-process ClickHouse Keeper. It contains one row per Raft cluster member, fusing static cluster topolo" + }, + { + "route": "/reference/system-tables/keeper_snapshots", + "title": "system.keeper_snapshots", + "file": "reference/system-tables/keeper_snapshots.mdx", + "siteContentCharacters": 938, + "siteContentExcerpt": " ## Description {#description} This table does not exist if this node is not configured to run an in-process ClickHouse Keeper. It contains one row per Raft snapshot file tracked by the in-process Keep" + }, + { + "route": "/reference/system-tables/keywords", + "title": "system.keywords", + "file": "reference/system-tables/keywords.mdx", + "siteContentCharacters": 112, + "siteContentExcerpt": "## Description {#description} Contains a list of all keywords used in ClickHouse parser. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/licenses", + "title": "system.licenses", + "file": "reference/system-tables/licenses.mdx", + "siteContentCharacters": 807, + "siteContentExcerpt": "## Description {#description} Contains licenses of third-party libraries that are located in the [contrib](https://github.com/ClickHouse/ClickHouse/tree/master/contrib) directory of ClickHouse sources. ## Columns {#colum" + }, + { + "route": "/reference/system-tables/macros", + "title": "system.macros", + "file": "reference/system-tables/macros.mdx", + "siteContentCharacters": 116, + "siteContentExcerpt": "## Description {#description} Contains a list of all macros defined in server configuration. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/masking_policies", + "title": "system.masking_policies", + "file": "reference/system-tables/masking_policies.mdx", + "siteContentCharacters": 409, + "siteContentExcerpt": "## Description {#description} Contains information about all masking policies defined in the system. Masking policies can only be created and applied in ClickHouse Cloud. In open-source builds the `system.masking_policie" + }, + { + "route": "/reference/system-tables/merge_tree_settings", + "title": "system.merge_tree_settings", + "file": "reference/system-tables/merge_tree_settings.mdx", + "siteContentCharacters": 1562, + "siteContentExcerpt": "## Description {#description} Contains information about settings for `MergeTree` tables. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.merge_tree_settings LIMIT 3 FORMAT Vertical; ``` ```respon" + }, + { + "route": "/reference/system-tables/merges", + "title": "system.merges", + "file": "reference/system-tables/merges.mdx", + "siteContentCharacters": 184, + "siteContentExcerpt": " ## Description {#description} Contains information about merges and part mutations currently in process for tables in the MergeTree family. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/metric_log", + "title": "system.metric_log", + "file": "reference/system-tables/metric_log.mdx", + "siteContentCharacters": 4644, + "siteContentExcerpt": " ## Description {#description} Contains history of metrics values from tables `system.metrics` and `system.events`, periodically flushed to disk. ## Columns {#columns} ## Example {#example} ```sql SELE" + }, + { + "route": "/reference/system-tables/metrics", + "title": "system.metrics", + "file": "reference/system-tables/metrics.mdx", + "siteContentCharacters": 70074, + "siteContentExcerpt": " ## Description {#description} Contains metrics which can be calculated instantly, or have a current value. For example, the number of simultaneously processed queries or the current replica delay. Thi" + }, + { + "route": "/reference/system-tables/models", + "title": "system.models", + "file": "reference/system-tables/models.mdx", + "siteContentCharacters": 161, + "siteContentExcerpt": "## Description {#description} Contains a list of CatBoost models loaded into a LibraryBridge's memory along with time when it was loaded. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/moves", + "title": "system.moves", + "file": "reference/system-tables/moves.mdx", + "siteContentCharacters": 1085, + "siteContentExcerpt": "## Description {#description} The table contains information about in-progress [data part moves](/reference/statements/alter/partition#move-partitionpart) of [MergeTree](/reference/engines/table-engines/mergetree-family/" + }, + { + "route": "/reference/system-tables/mutations", + "title": "system.mutations", + "file": "reference/system-tables/mutations.mdx", + "siteContentCharacters": 2790, + "siteContentExcerpt": "## Description {#description} The table contains information about [mutations](/reference/statements/alter/index#mutations) of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables and their pro" + }, + { + "route": "/reference/system-tables/named_collections", + "title": "system.named_collections", + "file": "reference/system-tables/named_collections.mdx", + "siteContentCharacters": 162, + "siteContentExcerpt": "## Description {#description} Contains a list of all named collections which were created via SQL query or parsed from configuration file. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/numbers", + "title": "system.numbers", + "file": "reference/system-tables/numbers.mdx", + "siteContentCharacters": 851, + "siteContentExcerpt": "## Description {#description} This table contains a single UInt64 column named `number` that contains almost all the natural numbers starting from zero. You can use this table for tests, or if you need to do a brute forc" + }, + { + "route": "/reference/system-tables/numbers_mt", + "title": "system.numbers_mt", + "file": "reference/system-tables/numbers_mt.mdx", + "siteContentCharacters": 468, + "siteContentExcerpt": "## Description {#description} The same as [`system.numbers`](/reference/system-tables/numbers) but reads are parallelized. The numbers can be returned in any order. Used for tests. ## Columns {#columns} ## Example {#exam" + }, + { + "route": "/reference/system-tables/one", + "title": "system.one", + "file": "reference/system-tables/one.mdx", + "siteContentCharacters": 433, + "siteContentExcerpt": "## Description {#description} This table contains a single row with a single `dummy` UInt8 column containing the value 0. This table is used if a `SELECT` query does not specify the `FROM` clause. This is similar to the " + }, + { + "route": "/reference/system-tables/opentelemetry_span_log", + "title": "system.opentelemetry_span_log", + "file": "reference/system-tables/opentelemetry_span_log.mdx", + "siteContentCharacters": 824, + "siteContentExcerpt": " ## Description {#description} Contains information about [trace spans](https://opentracing.io/docs/overview/spans/) for executed queries. ## Columns {#columns} ## Example {#example} ```sql title=\"Quer" + }, + { + "route": "/reference/system-tables/part_log", + "title": "system.part_log", + "file": "reference/system-tables/part_log.mdx", + "siteContentCharacters": 3652, + "siteContentExcerpt": " ## Description {#description} The `system.part_log` table is created only if the [part_log](/reference/settings/server-settings/settings/other#part_log) server setting is specified. This table contain" + }, + { + "route": "/reference/system-tables/part_moves_between_shards", + "title": "system.part_moves_between_shards", + "file": "reference/system-tables/part_moves_between_shards.mdx", + "siteContentCharacters": 164, + "siteContentExcerpt": "## Description {#description} Contains information about parts which are currently in a process of moving between shards and their progress. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/parts", + "title": "system.parts", + "file": "reference/system-tables/parts.mdx", + "siteContentCharacters": 2600, + "siteContentExcerpt": "## Description {#description} Contains information about parts of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables. Each row describes one data part. ## Columns {#columns} ## Example {#exam" + }, + { + "route": "/reference/system-tables/parts_columns", + "title": "system.parts_columns", + "file": "reference/system-tables/parts_columns.mdx", + "siteContentCharacters": 2191, + "siteContentExcerpt": "## Description {#description} Contains information about parts and columns of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables. Each row describes one data part. ## Columns {#columns} ## Ex" + }, + { + "route": "/reference/system-tables/predicate_statistics_log", + "title": "system.predicate_statistics_log", + "file": "reference/system-tables/predicate_statistics_log.mdx", + "siteContentCharacters": 2658, + "siteContentExcerpt": " ## Description {#description} Contains sampled selectivity statistics collected while reading from `MergeTree` tables. The table is populated only when [`predicate_statistics_sample_rate`](/reference/" + }, + { + "route": "/reference/system-tables/primes", + "title": "system.primes", + "file": "reference/system-tables/primes.mdx", + "siteContentCharacters": 927, + "siteContentExcerpt": "## Description {#description} This table contains a single UInt64 column named `prime` that contains prime numbers in ascending order, starting from 2. You can use this table for tests, or if you need to do a brute force" + }, + { + "route": "/reference/system-tables/privileges", + "title": "system.privileges", + "file": "reference/system-tables/privileges.mdx", + "siteContentCharacters": 138, + "siteContentExcerpt": "## Description {#description} Contains a list of all available privileges that could be granted to a user or role. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/processes", + "title": "system.processes", + "file": "reference/system-tables/processes.mdx", + "siteContentCharacters": 1823, + "siteContentExcerpt": " ## Description {#description} This system table is used for implementing the `SHOW PROCESSLIST` query. ## Columns {#columns} ```sql SELECT * FROM system.processes LIMIT 10 FORMAT Vertical; ``` ```resp" + }, + { + "route": "/reference/system-tables/processors_profile_log", + "title": "system.processors_profile_log", + "file": "reference/system-tables/processors_profile_log.mdx", + "siteContentCharacters": 2299, + "siteContentExcerpt": " ## Description {#description} This table contains profiling on processors level (that you can find in [`EXPLAIN PIPELINE`](/reference/statements/explain#explain-pipeline)). ## Columns {#columns} ## Ex" + }, + { + "route": "/reference/system-tables/projection_parts", + "title": "system.projection_parts", + "file": "reference/system-tables/projection_parts.mdx", + "siteContentCharacters": 144, + "siteContentExcerpt": "## Description {#description} This table contains information about projection parts for tables of the MergeTree family. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/projection_parts_columns", + "title": "system.projection_parts_columns", + "file": "reference/system-tables/projection_parts_columns.mdx", + "siteContentCharacters": 155, + "siteContentExcerpt": "## Description {#description} This table contains information about columns in projection parts for tables of the MergeTree family. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/projections", + "title": "system.projections", + "file": "reference/system-tables/projections.mdx", + "siteContentCharacters": 591, + "siteContentExcerpt": "## Description {#description} Contains information about existing projections in all tables. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.projections LIMIT 2 FORMAT Vertical; ``` ```text Row 1:" + }, + { + "route": "/reference/system-tables/query_cache", + "title": "system.query_cache", + "file": "reference/system-tables/query_cache.mdx", + "siteContentCharacters": 547, + "siteContentExcerpt": " ## Description {#description} Shows the content of the [query cache](/concepts/features/performance/caches/query-cache). ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.query_c" + }, + { + "route": "/reference/system-tables/query_condition_cache", + "title": "system.query_condition_cache", + "file": "reference/system-tables/query_condition_cache.mdx", + "siteContentCharacters": 694, + "siteContentExcerpt": " ## Description {#description} Shows the content of the [query condition cache](/concepts/features/performance/caches/query-condition-cache). ## Columns {#columns} ## Example {#example} ```sql title=\"Q" + }, + { + "route": "/reference/system-tables/query_log", + "title": "system.query_log", + "file": "reference/system-tables/query_log.mdx", + "siteContentCharacters": 7973, + "siteContentExcerpt": " ## Description {#description} Stores metadata and statistics about executed queries, such as start time, duration, error messages, resource usage, and other execution details. It does not store the re" + }, + { + "route": "/reference/system-tables/query_metric_log", + "title": "system.query_metric_log", + "file": "reference/system-tables/query_metric_log.mdx", + "siteContentCharacters": 2210, + "siteContentExcerpt": " ## Description {#description} Contains a history of memory and metric values from table `system.events` for individual queries, periodically flushed to disk. Once a query starts, data is collected at " + }, + { + "route": "/reference/system-tables/query_thread_log", + "title": "system.query_thread_log", + "file": "reference/system-tables/query_thread_log.mdx", + "siteContentCharacters": 3329, + "siteContentExcerpt": " ## Description {#description} Contains information about threads that execute queries, for example, thread name, thread start time, duration of query processing. To start logging: 1. Configure paramet" + }, + { + "route": "/reference/system-tables/query_views_log", + "title": "system.query_views_log", + "file": "reference/system-tables/query_views_log.mdx", + "siteContentCharacters": 2442, + "siteContentExcerpt": " ## Description {#description} Contains information about the dependent views executed when running a query, for example, the view type or the execution time. To start logging: 1. Configure parameters " + }, + { + "route": "/reference/system-tables/quota_limits", + "title": "system.quota_limits", + "file": "reference/system-tables/quota_limits.mdx", + "siteContentCharacters": 178, + "siteContentExcerpt": "## Description {#description} Contains information about maximums for all intervals of all quotas. Any number of rows or zero can correspond to one quota. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/quota_usage", + "title": "system.quota_usage", + "file": "reference/system-tables/quota_usage.mdx", + "siteContentCharacters": 227, + "siteContentExcerpt": " ## Description {#description} Quota usage by the current user: how much is used and how much is left. ## Columns {#columns} ## See Also {#see-also} - [SHOW QUOTA](/reference/statements/show#show-quota" + }, + { + "route": "/reference/system-tables/quotas", + "title": "system.quotas", + "file": "reference/system-tables/quotas.mdx", + "siteContentCharacters": 205, + "siteContentExcerpt": "## Description {#description} Contains information about [quotas](/reference/system-tables/quotas). ## Columns {#columns} ## See Also {#see-also} - [SHOW QUOTAS](/reference/statements/show#show-quotas)" + }, + { + "route": "/reference/system-tables/quotas_usage", + "title": "system.quotas_usage", + "file": "reference/system-tables/quotas_usage.mdx", + "siteContentCharacters": 181, + "siteContentExcerpt": " ## Description {#description} Quota usage by all users. ## Columns {#columns} ## See Also {#see-also} - [SHOW QUOTA](/reference/statements/show#show-quota))" + }, + { + "route": "/reference/system-tables/remote_data_paths", + "title": "system.remote_data_paths", + "file": "reference/system-tables/remote_data_paths.mdx", + "siteContentCharacters": 1163, + "siteContentExcerpt": "## Description {#description} Contains information about data files stored on remote disks (e.g. S3, Azure Blob Storage), including the mapping between local metadata paths and remote blob paths. Each row represents one " + }, + { + "route": "/reference/system-tables/replicas", + "title": "system.replicas", + "file": "reference/system-tables/replicas.mdx", + "siteContentCharacters": 1637, + "siteContentExcerpt": "## Description {#description} Contains information and status for replicated tables residing on the local server. This table can be used for monitoring. The table contains a row for every Replicated\\* table. ## Columns {" + }, + { + "route": "/reference/system-tables/replicated_fetches", + "title": "system.replicated_fetches", + "file": "reference/system-tables/replicated_fetches.mdx", + "siteContentCharacters": 1212, + "siteContentExcerpt": " ## Description {#description} Contains information about currently running background fetches. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.replicated_fetches LIMIT 1 FORMAT" + }, + { + "route": "/reference/system-tables/replicated_merge_tree_settings", + "title": "system.replicated_merge_tree_settings", + "file": "reference/system-tables/replicated_merge_tree_settings.mdx", + "siteContentCharacters": 245, + "siteContentExcerpt": "## Description {#description} Contains a list of all ReplicatedMergeTree engine specific settings, their current and default values along with descriptions. You may change any of them in SETTINGS section in CREATE query." + }, + { + "route": "/reference/system-tables/replication_queue", + "title": "system.replication_queue", + "file": "reference/system-tables/replication_queue.mdx", + "siteContentCharacters": 1464, + "siteContentExcerpt": "## Description {#description} Contains information about tasks from replication queues stored in ClickHouse Keeper, or ZooKeeper, for tables in the `ReplicatedMergeTree` family. ## Columns {#columns} ## Example {#example" + }, + { + "route": "/reference/system-tables/resources", + "title": "system.resources", + "file": "reference/system-tables/resources.mdx", + "siteContentCharacters": 599, + "siteContentExcerpt": "## Description {#description} Contains information about [resources](/concepts/features/configuration/server-config/workload-scheduling#workload_entity_storage) residing on the local server. The table contains a row for " + }, + { + "route": "/reference/system-tables/rocksdb", + "title": "system.rocksdb", + "file": "reference/system-tables/rocksdb.mdx", + "siteContentCharacters": 111, + "siteContentExcerpt": "## Description {#description} Contains a list of metrics exposed from embedded RocksDB. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/role_grants", + "title": "system.role_grants", + "file": "reference/system-tables/role_grants.mdx", + "siteContentCharacters": 155, + "siteContentExcerpt": "## Description {#description} Contains the role grants for users and roles. To add entries to this table, use `GRANT role TO user`. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/roles", + "title": "system.roles", + "file": "reference/system-tables/roles.mdx", + "siteContentCharacters": 239, + "siteContentExcerpt": "## Description {#description} Contains information about configured [roles](/concepts/features/security/access-rights#role-management). ## Columns {#columns} ## See Also {#see-also} - [SHOW ROLES](/reference/statements/s" + }, + { + "route": "/reference/system-tables/row_policies", + "title": "system.row_policies", + "file": "reference/system-tables/row_policies.mdx", + "siteContentCharacters": 256, + "siteContentExcerpt": "## Description {#description} Contains filters for one particular table, as well as a list of roles and/or users which should use this row policy. ## Columns {#columns} ## See Also {#see-also} - [SHOW POLICIES](/referenc" + }, + { + "route": "/reference/system-tables/s3_queue_metadata", + "title": "system.s3_queue_metadata", + "file": "reference/system-tables/s3_queue_metadata.mdx", + "siteContentCharacters": 318, + "siteContentExcerpt": "## Description {#description} Contains the current number of processed, processing and failed nodes in keeper for each S3Queue metadata object and, on demand, their contents. Unlike system.s3queue_metadata_cache, which s" + }, + { + "route": "/reference/system-tables/s3_queue_settings", + "title": "system.s3_queue_settings", + "file": "reference/system-tables/s3_queue_settings.mdx", + "siteContentCharacters": 208, + "siteContentExcerpt": "## Description {#description} Contains information about the settings of [S3Queue](/reference/engines/table-engines/integrations/s3queue) tables. Available from server version `24.10`. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/s3queue_log", + "title": "system.s3queue_log", + "file": "reference/system-tables/s3queue_log.mdx", + "siteContentCharacters": 148, + "siteContentExcerpt": "Contains log entries with information about files processed by the S3Queue engine. It is safe to truncate or drop this table at any time. Columns:" + }, + { + "route": "/reference/system-tables/s3queue_metadata_cache", + "title": "system.s3queue_metadata_cache", + "file": "reference/system-tables/s3queue_metadata_cache.mdx", + "siteContentCharacters": 137, + "siteContentExcerpt": "## Description {#description} Contains in-memory state of S3Queue metadata and currently processed rows per file. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/scheduler", + "title": "system.scheduler", + "file": "reference/system-tables/scheduler.mdx", + "siteContentCharacters": 1123, + "siteContentExcerpt": " ## Description {#description} Contains information about and status of [scheduling nodes](/concepts/features/configuration/server-config/workload-scheduling#hierarchy) residing on the local server. Th" + }, + { + "route": "/reference/system-tables/schema_inference_cache", + "title": "system.schema_inference_cache", + "file": "reference/system-tables/schema_inference_cache.mdx", + "siteContentCharacters": 2557, + "siteContentExcerpt": " ## Description {#description} Contains information about all cached file schemas. ## Columns {#columns} ## Example {#example} Let's say we have a file `data.jsonl` with this content: ```json {\"id\" : 1" + }, + { + "route": "/reference/system-tables/server_settings", + "title": "system.server_settings", + "file": "reference/system-tables/server_settings.mdx", + "siteContentCharacters": 5201, + "siteContentExcerpt": " ## Description {#description} Contains information about global settings for the server, which are specified in `config.xml`. The table also includes supported nested settings with a fixed structure; " + }, + { + "route": "/reference/system-tables/session_log", + "title": "system.session_log", + "file": "reference/system-tables/session_log.mdx", + "siteContentCharacters": 2408, + "siteContentExcerpt": " ## Description {#description} Contains information about all successful and failed login and logout events. ## Columns {#columns} ## Example {#example} ```sql title=\"Query\" SELECT * FROM system.sessio" + }, + { + "route": "/reference/system-tables/settings", + "title": "system.settings", + "file": "reference/system-tables/settings.mdx", + "siteContentCharacters": 3644, + "siteContentExcerpt": "## Description {#description} Contains information about session settings for current user. ## Columns {#columns} ## Example {#example} The following example shows how to get information about settings which name contain" + }, + { + "route": "/reference/system-tables/settings_changes", + "title": "system.settings_changes", + "file": "reference/system-tables/settings_changes.mdx", + "siteContentCharacters": 1029, + "siteContentExcerpt": "## Description {#description} Contains information about setting changes in previous ClickHouse versions. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.settings_changes WHERE version = '23.5' FO" + }, + { + "route": "/reference/system-tables/settings_profile_elements", + "title": "system.settings_profile_elements", + "file": "reference/system-tables/settings_profile_elements.mdx", + "siteContentCharacters": 191, + "siteContentExcerpt": "## Description {#description} Describes the content of the settings profile: - Сonstraints. - Roles and users that the setting applies to. - Parent settings profiles. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/settings_profiles", + "title": "system.settings_profiles", + "file": "reference/system-tables/settings_profiles.mdx", + "siteContentCharacters": 191, + "siteContentExcerpt": "## Description {#description} Contains properties of configured setting profiles. ## Columns {#columns} ## See Also {#see-also} - [SHOW PROFILES](/reference/statements/show#show-profiles)" + }, + { + "route": "/reference/system-tables/stack_trace", + "title": "system.stack_trace", + "file": "reference/system-tables/stack_trace.mdx", + "siteContentCharacters": 6421, + "siteContentExcerpt": " ## Description {#description} Contains stack traces of all server threads. Allows developers to introspect the server state. To analyze stack frames, use the `addressToLine`, `addressToLineWithInlines" + }, + { + "route": "/reference/system-tables/statements", + "title": "system.statements", + "file": "reference/system-tables/statements.mdx", + "siteContentCharacters": 106, + "siteContentExcerpt": "## Description {#description} Contains a list of all SQL statements of ClickHouse. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/stemmers", + "title": "system.stemmers", + "file": "reference/system-tables/stemmers.mdx", + "siteContentCharacters": 794, + "siteContentExcerpt": "## Description {#description} Shows all available stemmers. These can be used in the function [stem](/reference/functions/regular-functions/nlp-functions). **Availability** `system.stemmers` is present only in Cli" + }, + { + "route": "/reference/system-tables/storage_policies", + "title": "system.storage_policies", + "file": "reference/system-tables/storage_policies.mdx", + "siteContentCharacters": 2916, + "siteContentExcerpt": "## Description {#description} Contains information about storage policies and volumes which are defined in [server configuration](/reference/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multipl" + }, + { + "route": "/reference/system-tables/symbols", + "title": "system.symbols", + "file": "reference/system-tables/symbols.mdx", + "siteContentCharacters": 2297, + "siteContentExcerpt": "## Description {#description} Contains information for introspection of `clickhouse` binary. It requires the introspection privilege to access. This table is only useful for C++ experts and ClickHouse engineers. ## Colum" + }, + { + "route": "/reference/system-tables/table_engines", + "title": "system.table_engines", + "file": "reference/system-tables/table_engines.mdx", + "siteContentCharacters": 1882, + "siteContentExcerpt": "## Description {#description} Contains description of table engines supported by server and their feature support information. This table contains the following columns (the column type is shown in brackets): ## Example " + }, + { + "route": "/reference/system-tables/table_functions", + "title": "system.table_functions", + "file": "reference/system-tables/table_functions.mdx", + "siteContentCharacters": 127, + "siteContentExcerpt": "## Description {#description} Contains a list of all available table functions with their descriptions. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/tables", + "title": "system.tables", + "file": "reference/system-tables/tables.mdx", + "siteContentCharacters": 2931, + "siteContentExcerpt": "## Description {#description} Contains metadata of each table that the server knows about. [Detached](/reference/statements/detach) tables are not shown in `system.tables`. [Temporary tables](/reference/statements/create" + }, + { + "route": "/reference/system-tables/text_log", + "title": "system.text_log", + "file": "reference/system-tables/text_log.mdx", + "siteContentCharacters": 1183, + "siteContentExcerpt": " ## Description {#description} Contains logging entries. The logging level which goes to this table can be limited to the `text_log.level` server setting. ## Columns {#columns} ## Example {#example} ``" + }, + { + "route": "/reference/system-tables/time_zones", + "title": "system.time_zones", + "file": "reference/system-tables/time_zones.mdx", + "siteContentCharacters": 567, + "siteContentExcerpt": "## Description {#description} Contains a list of time zones that are supported by the ClickHouse server. This list of timezones might vary depending on the version of ClickHouse. ## Columns {#columns} ## Example {#exampl" + }, + { + "route": "/reference/system-tables/tokenizers", + "title": "system.tokenizers", + "file": "reference/system-tables/tokenizers.mdx", + "siteContentCharacters": 834, + "siteContentExcerpt": " ## Description {#description} Shows all available tokenizers. These can be used in functions [tokens](/reference/functions/regular-functions/splitting-merging-functions#tokens), [hasAllTokens](/refere" + }, + { + "route": "/reference/system-tables/trace_log", + "title": "system.trace_log", + "file": "reference/system-tables/trace_log.mdx", + "siteContentCharacters": 8769, + "siteContentExcerpt": " ## Description {#description} Contains stack traces collected by the [sampling query profiler](/concepts/features/performance/troubleshoot/sampling-query-profiler). ClickHouse creates this table when " + }, + { + "route": "/reference/system-tables/transactions", + "title": "system.transactions", + "file": "reference/system-tables/transactions.mdx", + "siteContentCharacters": 102, + "siteContentExcerpt": "## Description {#description} Contains a list of transactions and their state. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/transactions_info_log", + "title": "system.transactions_info_log", + "file": "reference/system-tables/transactions_info_log.mdx", + "siteContentCharacters": 139, + "siteContentExcerpt": "Contains information about all transactions executed on a current server. It is safe to truncate or drop this table at any time. Columns:" + }, + { + "route": "/reference/system-tables/unicode", + "title": "system.unicode", + "file": "reference/system-tables/unicode.mdx", + "siteContentCharacters": 5017, + "siteContentExcerpt": "## Description {#description} The `system.unicode` table is a virtual table that provides information about Unicode characters and their properties(https://unicode-org.github.io/icu/userguide/strings/properties.html). Th" + }, + { + "route": "/reference/system-tables/user_defined_functions", + "title": "system.user_defined_functions", + "file": "reference/system-tables/user_defined_functions.mdx", + "siteContentCharacters": 924, + "siteContentExcerpt": "## Description {#description} Contains loading status, error information, and configuration metadata for [User-Defined Functions (UDFs)](/reference/functions/regular-functions/udf). ## Columns {#columns} ## Example {#exa" + }, + { + "route": "/reference/system-tables/user_directories", + "title": "system.user_directories", + "file": "reference/system-tables/user_directories.mdx", + "siteContentCharacters": 213, + "siteContentExcerpt": "## Description {#description} Contains the information about configured user directories - directories on the file system from which ClickHouse server is allowed to read user provided data. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/user_processes", + "title": "system.user_processes", + "file": "reference/system-tables/user_processes.mdx", + "siteContentCharacters": 1292, + "siteContentExcerpt": " ## Description {#description} This system table can be used to get overview of memory usage and ProfileEvents of users. ## Columns {#columns} ## Example {#example} ```sql SELECT * FROM system.user_pro" + }, + { + "route": "/reference/system-tables/user_query_log", + "title": "system.user_query_log", + "file": "reference/system-tables/user_query_log.mdx", + "siteContentCharacters": 1984, + "siteContentExcerpt": "## Description {#description} Shows the current user their own query log records. It reads the query log table configured by the `query_log.database` and `query_log.table` server settings (`system.query_log` by default) " + }, + { + "route": "/reference/system-tables/users", + "title": "system.users", + "file": "reference/system-tables/users.mdx", + "siteContentCharacters": 261, + "siteContentExcerpt": "## Description {#description} Contains a list of [user accounts](/concepts/features/security/access-rights#user-account-management) configured on the server. ## Columns {#columns} ## See also {#see-also} - [SHOW USERS](/" + }, + { + "route": "/reference/system-tables/view_refreshes", + "title": "system.view_refreshes", + "file": "reference/system-tables/view_refreshes.mdx", + "siteContentCharacters": 741, + "siteContentExcerpt": " ## Description {#description} Information about [Refreshable Materialized Views](/reference/statements/create/view#refreshable-materialized-view). Contains all refreshable materialized views, regardle" + }, + { + "route": "/reference/system-tables/warnings", + "title": "system.warnings", + "file": "reference/system-tables/warnings.mdx", + "siteContentCharacters": 174, + "siteContentExcerpt": "## Description {#description} Contains warnings about server configuration to be displayed by clickhouse-client right after it connects to the server. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/workloads", + "title": "system.workloads", + "file": "reference/system-tables/workloads.mdx", + "siteContentCharacters": 666, + "siteContentExcerpt": "## Description {#description} Contains information for [workloads](/concepts/features/configuration/server-config/workload-scheduling#workload_entity_storage) residing on the local server. The table contains a row for ev" + }, + { + "route": "/reference/system-tables/zeros", + "title": "system.zeros", + "file": "reference/system-tables/zeros.mdx", + "siteContentCharacters": 106, + "siteContentExcerpt": "## Description {#description} Produces unlimited number of non-materialized zeros. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/zeros_mt", + "title": "system.zeros_mt", + "file": "reference/system-tables/zeros_mt.mdx", + "siteContentCharacters": 92, + "siteContentExcerpt": "## Description {#description} Multithreaded version of system.zeros. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/zookeeper", + "title": "system.zookeeper", + "file": "reference/system-tables/zookeeper.mdx", + "siteContentCharacters": 2106, + "siteContentExcerpt": "## Description {#description} The table does not exist unless ClickHouse Keeper or ZooKeeper is configured. The `system.zookeeper` table exposes data from the Keeper clusters defined in the config. The query must either " + }, + { + "route": "/reference/system-tables/zookeeper_connection", + "title": "system.zookeeper_connection", + "file": "reference/system-tables/zookeeper_connection.mdx", + "siteContentCharacters": 1095, + "siteContentExcerpt": " ## Description {#description} This table does not exist if ZooKeeper is not configured. The 'system.zookeeper_connection' table shows current connections to ZooKeeper (including auxiliary ZooKeepers)." + }, + { + "route": "/reference/system-tables/zookeeper_connection_log", + "title": "system.zookeeper_connection_log", + "file": "reference/system-tables/zookeeper_connection_log.mdx", + "siteContentCharacters": 4134, + "siteContentExcerpt": " ## Description {#description} The 'system.zookeeper_connection_log' table shows the history of ZooKeeper connections (including auxiliary ZooKeepers). Each row shows information about one event regard" + }, + { + "route": "/reference/system-tables/zookeeper_info", + "title": "system.zookeeper_info", + "file": "reference/system-tables/zookeeper_info.mdx", + "siteContentCharacters": 169, + "siteContentExcerpt": " ## Description {#description} This table outputs combined introspection about zookeeper and the nodes are taken from config. ## Columns {#columns}" + }, + { + "route": "/reference/system-tables/zookeeper_log", + "title": "system.zookeeper_log", + "file": "reference/system-tables/zookeeper_log.mdx", + "siteContentCharacters": 2331, + "siteContentExcerpt": "## Description {#description} This table contains information about the parameters of the request to the ZooKeeper server and the response from it. For requests, only columns with request parameters are filled in, and th" + } + ], + "currentAutogeneratedRoutesWithoutSnapshotCounterpart": [ + { + "route": "/reference/formats/DWARF", + "title": "DWARF", + "file": "reference/formats/DWARF.mdx" + }, + { + "route": "/reference/functions/regular-functions/embedded-dict-functions", + "title": "Functions for Working with Embedded Dictionaries", + "file": "reference/functions/regular-functions/embedded-dict-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/uniqtheta-functions", + "title": "uniqTheta Functions", + "file": "reference/functions/regular-functions/uniqtheta-functions.mdx" + }, + { + "route": "/reference/settings/beta-and-experimental-features", + "title": "Beta and experimental features", + "file": "reference/settings/beta-and-experimental-features.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/in-memory", + "title": "in_memory_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/in-memory.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/kill-delay-period", + "title": "kill_delay_period_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/kill-delay-period.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/max-part", + "title": "max_part_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/max-part.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/write-ahead", + "title": "write_ahead_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/write-ahead.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/access-control", + "title": "access_control_* server settings", + "file": "reference/settings/server-settings/settings/access-control.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/custom", + "title": "custom_* server settings", + "file": "reference/settings/server-settings/settings/custom.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/graphite", + "title": "graphite_* server settings", + "file": "reference/settings/server-settings/settings/graphite.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/query", + "title": "query_* server settings", + "file": "reference/settings/server-settings/settings/query.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/remote", + "title": "remote_* server settings", + "file": "reference/settings/server-settings/settings/remote.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/tcp-port", + "title": "tcp_port_* server settings", + "file": "reference/settings/server-settings/settings/tcp-port.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/user-defined", + "title": "user_defined_* server settings", + "file": "reference/settings/server-settings/settings/user-defined.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/workload", + "title": "workload_* server settings", + "file": "reference/settings/server-settings/settings/workload.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/zookeeper", + "title": "zookeeper_* server settings", + "file": "reference/settings/server-settings/settings/zookeeper.mdx" + }, + { + "route": "/reference/system-tables/delta_lake_metadata_log", + "title": "system.delta_lake_metadata_log", + "file": "reference/system-tables/delta_lake_metadata_log.mdx" + }, + { + "route": "/reference/system-tables/histogram_metric_log", + "title": "system.histogram_metric_log", + "file": "reference/system-tables/histogram_metric_log.mdx" + }, + { + "route": "/reference/system-tables/information_schema", + "title": "INFORMATION_SCHEMA", + "file": "reference/system-tables/information_schema.mdx" + }, + { + "route": "/reference/system-tables/instrumentation", + "title": "system.instrumentation", + "file": "reference/system-tables/instrumentation.mdx" + }, + { + "route": "/reference/system-tables/models", + "title": "system.models", + "file": "reference/system-tables/models.mdx" + } + ], + "classifiedLegacyExceptions": [ + { + "route": "/reference/formats/DWARF", + "title": "DWARF", + "file": "reference/formats/DWARF.mdx", + "disposition": "feature-gated", + "note": "Current master registers format documentation only in builds that include the DWARF parser." + }, + { + "route": "/reference/functions/regular-functions/embedded-dict-functions", + "title": "Functions for Working with Embedded Dictionaries", + "file": "reference/functions/regular-functions/embedded-dict-functions.mdx", + "disposition": "retained-template", + "note": "A collection-level explanatory page; it is not one direct snapshot entity." + }, + { + "route": "/reference/functions/regular-functions/uniqtheta-functions", + "title": "uniqTheta Functions", + "file": "reference/functions/regular-functions/uniqtheta-functions.mdx", + "disposition": "retained-template", + "note": "A collection-level explanatory page; it is not one direct snapshot entity." + }, + { + "route": "/reference/settings/beta-and-experimental-features", + "title": "Beta and experimental features", + "file": "reference/settings/beta-and-experimental-features.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/merge-tree-settings/in-memory", + "title": "in_memory_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/in-memory.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/merge-tree-settings/kill-delay-period", + "title": "kill_delay_period_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/kill-delay-period.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/merge-tree-settings/max-part", + "title": "max_part_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/max-part.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/merge-tree-settings/write-ahead", + "title": "write_ahead_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/write-ahead.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/access-control", + "title": "access_control_* server settings", + "file": "reference/settings/server-settings/settings/access-control.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/custom", + "title": "custom_* server settings", + "file": "reference/settings/server-settings/settings/custom.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/graphite", + "title": "graphite_* server settings", + "file": "reference/settings/server-settings/settings/graphite.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/query", + "title": "query_* server settings", + "file": "reference/settings/server-settings/settings/query.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/remote", + "title": "remote_* server settings", + "file": "reference/settings/server-settings/settings/remote.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/tcp-port", + "title": "tcp_port_* server settings", + "file": "reference/settings/server-settings/settings/tcp-port.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/user-defined", + "title": "user_defined_* server settings", + "file": "reference/settings/server-settings/settings/user-defined.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/workload", + "title": "workload_* server settings", + "file": "reference/settings/server-settings/settings/workload.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/settings/server-settings/settings/zookeeper", + "title": "zookeeper_* server settings", + "file": "reference/settings/server-settings/settings/zookeeper.mdx", + "disposition": "snapshot-omitted", + "note": "This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot." + }, + { + "route": "/reference/system-tables/delta_lake_metadata_log", + "title": "system.delta_lake_metadata_log", + "file": "reference/system-tables/delta_lake_metadata_log.mdx", + "disposition": "redirect", + "note": "Redirect this alternate legacy URL to /reference/system-tables/delta_metadata_log." + }, + { + "route": "/reference/system-tables/histogram_metric_log", + "title": "system.histogram_metric_log", + "file": "reference/system-tables/histogram_metric_log.mdx", + "disposition": "retained-template", + "note": "Current master does not emit a system.documentation record for this page; it needs source metadata before it can become snapshot-owned." + }, + { + "route": "/reference/system-tables/information_schema", + "title": "INFORMATION_SCHEMA", + "file": "reference/system-tables/information_schema.mdx", + "disposition": "derived", + "note": "INFORMATION_SCHEMA is a database of views, not a system table catalog record." + }, + { + "route": "/reference/system-tables/instrumentation", + "title": "system.instrumentation", + "file": "reference/system-tables/instrumentation.mdx", + "disposition": "feature-gated", + "note": "The table and its system.documentation record exist only in XRay-enabled builds." + }, + { + "route": "/reference/system-tables/models", + "title": "system.models", + "file": "reference/system-tables/models.mdx", + "disposition": "retained-historical", + "note": "system.models was removed; the page is intentionally historical." + } + ], + "unclassifiedLegacyExceptions": [], + "statements": { + "pages": 131, + "sourceOwnedPages": 7, + "markerWrappedPages": 124, + "sourceOwnedRoutes": [ + "/reference/statements", + "/reference/statements/create/dictionary/attributes", + "/reference/statements/create/dictionary/embedded", + "/reference/statements/create/dictionary/layouts/hierarchical", + "/reference/statements/create/dictionary/layouts/overview", + "/reference/statements/create/dictionary/lifetime", + "/reference/statements/create/dictionary/sources/overview" + ], + "markerWrappedRoutes": [ + "/reference/statements/alter", + "/reference/statements/alter/apply-deleted-mask", + "/reference/statements/alter/apply-patches", + "/reference/statements/alter/column", + "/reference/statements/alter/comment", + "/reference/statements/alter/constraint", + "/reference/statements/alter/database-comment", + "/reference/statements/alter/delete", + "/reference/statements/alter/masking-policy", + "/reference/statements/alter/named-collection", + "/reference/statements/alter/order-by", + "/reference/statements/alter/partition", + "/reference/statements/alter/projection", + "/reference/statements/alter/quota", + "/reference/statements/alter/role", + "/reference/statements/alter/row-policy", + "/reference/statements/alter/sample-by", + "/reference/statements/alter/setting", + "/reference/statements/alter/settings-profile", + "/reference/statements/alter/skipping-index", + "/reference/statements/alter/statistics", + "/reference/statements/alter/ttl", + "/reference/statements/alter/update", + "/reference/statements/alter/user", + "/reference/statements/alter/view", + "/reference/statements/attach", + "/reference/statements/check-database", + "/reference/statements/check-grant", + "/reference/statements/check-table", + "/reference/statements/create", + "/reference/statements/create/database", + "/reference/statements/create/dictionary", + "/reference/statements/create/dictionary/layouts/cache", + "/reference/statements/create/dictionary/layouts/direct", + "/reference/statements/create/dictionary/layouts/flat", + "/reference/statements/create/dictionary/layouts/hashed", + "/reference/statements/create/dictionary/layouts/hashed-array", + "/reference/statements/create/dictionary/layouts/ip-trie", + "/reference/statements/create/dictionary/layouts/naive-bayes", + "/reference/statements/create/dictionary/layouts/polygon", + "/reference/statements/create/dictionary/layouts/range-hashed", + "/reference/statements/create/dictionary/layouts/regexp-tree", + "/reference/statements/create/dictionary/layouts/ssd-cache", + "/reference/statements/create/dictionary/sources/cassandra", + "/reference/statements/create/dictionary/sources/clickhouse", + "/reference/statements/create/dictionary/sources/executable-file", + "/reference/statements/create/dictionary/sources/executable-pool", + "/reference/statements/create/dictionary/sources/http", + "/reference/statements/create/dictionary/sources/local-file", + "/reference/statements/create/dictionary/sources/mongodb", + "/reference/statements/create/dictionary/sources/mysql", + "/reference/statements/create/dictionary/sources/null", + "/reference/statements/create/dictionary/sources/odbc", + "/reference/statements/create/dictionary/sources/postgresql", + "/reference/statements/create/dictionary/sources/redis", + "/reference/statements/create/dictionary/sources/yamlregexptree", + "/reference/statements/create/dictionary/sources/ytsaurus", + "/reference/statements/create/function", + "/reference/statements/create/handler", + "/reference/statements/create/masking-policy", + "/reference/statements/create/named-collection", + "/reference/statements/create/quota", + "/reference/statements/create/role", + "/reference/statements/create/row-policy", + "/reference/statements/create/settings-profile", + "/reference/statements/create/table", + "/reference/statements/create/table/codec", + "/reference/statements/create/table/replace-table", + "/reference/statements/create/table/temporary-table", + "/reference/statements/create/user", + "/reference/statements/create/view", + "/reference/statements/delete", + "/reference/statements/describe-table", + "/reference/statements/detach", + "/reference/statements/distributed-ddl", + "/reference/statements/drop", + "/reference/statements/exchange", + "/reference/statements/execute_as", + "/reference/statements/exists", + "/reference/statements/explain", + "/reference/statements/grant", + "/reference/statements/hypothetical-index", + "/reference/statements/in", + "/reference/statements/insert-into", + "/reference/statements/kill", + "/reference/statements/move", + "/reference/statements/optimize", + "/reference/statements/parallel_with", + "/reference/statements/rename", + "/reference/statements/revoke", + "/reference/statements/select", + "/reference/statements/select/all", + "/reference/statements/select/apply_modifier", + "/reference/statements/select/array-join", + "/reference/statements/select/distinct", + "/reference/statements/select/except", + "/reference/statements/select/except_modifier", + "/reference/statements/select/format", + "/reference/statements/select/from", + "/reference/statements/select/group-by", + "/reference/statements/select/having", + "/reference/statements/select/intersect", + "/reference/statements/select/into-outfile", + "/reference/statements/select/join", + "/reference/statements/select/limit", + "/reference/statements/select/limit-by", + "/reference/statements/select/offset", + "/reference/statements/select/order-by", + "/reference/statements/select/pipe-operators", + "/reference/statements/select/prewhere", + "/reference/statements/select/qualify", + "/reference/statements/select/replace_modifier", + "/reference/statements/select/sample", + "/reference/statements/select/union", + "/reference/statements/select/where", + "/reference/statements/select/with", + "/reference/statements/set", + "/reference/statements/set-role", + "/reference/statements/show", + "/reference/statements/system", + "/reference/statements/truncate", + "/reference/statements/undrop", + "/reference/statements/update", + "/reference/statements/use" + ] + }, + "generatedRoutesWithoutCurrentPage": [ + { + "route": "/reference", + "title": "ClickHouse reference prototype", + "file": "reference-prototype/index.mdx" + }, + { + "route": "/reference/data-types/datetime32", + "title": "DateTime32", + "file": "reference-prototype/data-types/datetime32.mdx" + }, + { + "route": "/reference/data-types/decimal128", + "title": "Decimal128", + "file": "reference-prototype/data-types/decimal128.mdx" + }, + { + "route": "/reference/data-types/decimal256", + "title": "Decimal256", + "file": "reference-prototype/data-types/decimal256.mdx" + }, + { + "route": "/reference/data-types/decimal32", + "title": "Decimal32", + "file": "reference-prototype/data-types/decimal32.mdx" + }, + { + "route": "/reference/data-types/decimal64", + "title": "Decimal64", + "file": "reference-prototype/data-types/decimal64.mdx" + }, + { + "route": "/reference/data-types/enum16", + "title": "Enum16", + "file": "reference-prototype/data-types/enum16.mdx" + }, + { + "route": "/reference/data-types/enum8", + "title": "Enum8", + "file": "reference-prototype/data-types/enum8.mdx" + }, + { + "route": "/reference/data-types/float32", + "title": "Float32", + "file": "reference-prototype/data-types/float32.mdx" + }, + { + "route": "/reference/data-types/float64", + "title": "Float64", + "file": "reference-prototype/data-types/float64.mdx" + }, + { + "route": "/reference/data-types/geo-2", + "title": "LineString", + "file": "reference-prototype/data-types/geo-2.mdx" + }, + { + "route": "/reference/data-types/geo-3", + "title": "MultiLineString", + "file": "reference-prototype/data-types/geo-3.mdx" + }, + { + "route": "/reference/data-types/geo-4", + "title": "MultiPoint", + "file": "reference-prototype/data-types/geo-4.mdx" + }, + { + "route": "/reference/data-types/geo-5", + "title": "MultiPolygon", + "file": "reference-prototype/data-types/geo-5.mdx" + }, + { + "route": "/reference/data-types/geo-6", + "title": "Point", + "file": "reference-prototype/data-types/geo-6.mdx" + }, + { + "route": "/reference/data-types/geo-7", + "title": "Polygon", + "file": "reference-prototype/data-types/geo-7.mdx" + }, + { + "route": "/reference/data-types/geo-8", + "title": "Ring", + "file": "reference-prototype/data-types/geo-8.mdx" + }, + { + "route": "/reference/data-types/int128", + "title": "Int128", + "file": "reference-prototype/data-types/int128.mdx" + }, + { + "route": "/reference/data-types/int16", + "title": "Int16", + "file": "reference-prototype/data-types/int16.mdx" + }, + { + "route": "/reference/data-types/int256", + "title": "Int256", + "file": "reference-prototype/data-types/int256.mdx" + }, + { + "route": "/reference/data-types/int32", + "title": "Int32", + "file": "reference-prototype/data-types/int32.mdx" + }, + { + "route": "/reference/data-types/int64", + "title": "Int64", + "file": "reference-prototype/data-types/int64.mdx" + }, + { + "route": "/reference/data-types/int8", + "title": "Int8", + "file": "reference-prototype/data-types/int8.mdx" + }, + { + "route": "/reference/data-types/intervalday", + "title": "IntervalDay", + "file": "reference-prototype/data-types/intervalday.mdx" + }, + { + "route": "/reference/data-types/intervalhour", + "title": "IntervalHour", + "file": "reference-prototype/data-types/intervalhour.mdx" + }, + { + "route": "/reference/data-types/intervalmicrosecond", + "title": "IntervalMicrosecond", + "file": "reference-prototype/data-types/intervalmicrosecond.mdx" + }, + { + "route": "/reference/data-types/intervalmillisecond", + "title": "IntervalMillisecond", + "file": "reference-prototype/data-types/intervalmillisecond.mdx" + }, + { + "route": "/reference/data-types/intervalminute", + "title": "IntervalMinute", + "file": "reference-prototype/data-types/intervalminute.mdx" + }, + { + "route": "/reference/data-types/intervalmonth", + "title": "IntervalMonth", + "file": "reference-prototype/data-types/intervalmonth.mdx" + }, + { + "route": "/reference/data-types/intervalnanosecond", + "title": "IntervalNanosecond", + "file": "reference-prototype/data-types/intervalnanosecond.mdx" + }, + { + "route": "/reference/data-types/intervalquarter", + "title": "IntervalQuarter", + "file": "reference-prototype/data-types/intervalquarter.mdx" + }, + { + "route": "/reference/data-types/intervalsecond", + "title": "IntervalSecond", + "file": "reference-prototype/data-types/intervalsecond.mdx" + }, + { + "route": "/reference/data-types/intervalweek", + "title": "IntervalWeek", + "file": "reference-prototype/data-types/intervalweek.mdx" + }, + { + "route": "/reference/data-types/intervalyear", + "title": "IntervalYear", + "file": "reference-prototype/data-types/intervalyear.mdx" + }, + { + "route": "/reference/data-types/nested", + "title": "Nested", + "file": "reference-prototype/data-types/nested.mdx" + }, + { + "route": "/reference/data-types/uint128", + "title": "UInt128", + "file": "reference-prototype/data-types/uint128.mdx" + }, + { + "route": "/reference/data-types/uint16", + "title": "UInt16", + "file": "reference-prototype/data-types/uint16.mdx" + }, + { + "route": "/reference/data-types/uint256", + "title": "UInt256", + "file": "reference-prototype/data-types/uint256.mdx" + }, + { + "route": "/reference/data-types/uint32", + "title": "UInt32", + "file": "reference-prototype/data-types/uint32.mdx" + }, + { + "route": "/reference/data-types/uint64", + "title": "UInt64", + "file": "reference-prototype/data-types/uint64.mdx" + }, + { + "route": "/reference/data-types/uint8", + "title": "UInt8", + "file": "reference-prototype/data-types/uint8.mdx" + }, + { + "route": "/reference/engines", + "title": "Engines", + "file": "reference-prototype/engines.mdx" + }, + { + "route": "/reference/engines/database-engines/dictionary", + "title": "Dictionary", + "file": "reference-prototype/engines/database-engines/dictionary.mdx" + }, + { + "route": "/reference/engines/database-engines/filesystem", + "title": "Filesystem", + "file": "reference-prototype/engines/database-engines/filesystem.mdx" + }, + { + "route": "/reference/engines/database-engines/hdfs", + "title": "HDFS", + "file": "reference-prototype/engines/database-engines/hdfs.mdx" + }, + { + "route": "/reference/engines/database-engines/memory", + "title": "Memory", + "file": "reference-prototype/engines/database-engines/memory.mdx" + }, + { + "route": "/reference/engines/database-engines/ordinary", + "title": "Ordinary", + "file": "reference-prototype/engines/database-engines/ordinary.mdx" + }, + { + "route": "/reference/engines/database-engines/remotesecure", + "title": "RemoteSecure", + "file": "reference-prototype/engines/database-engines/remotesecure.mdx" + }, + { + "route": "/reference/engines/database-engines/s3", + "title": "S3", + "file": "reference-prototype/engines/database-engines/s3.mdx" + }, + { + "route": "/reference/engines/database-engines/url", + "title": "URL", + "file": "reference-prototype/engines/database-engines/url.mdx" + }, + { + "route": "/reference/engines/table-engines/cosn", + "title": "COSN", + "file": "reference-prototype/engines/table-engines/cosn.mdx" + }, + { + "route": "/reference/engines/table-engines/deltalakeazure", + "title": "DeltaLakeAzure", + "file": "reference-prototype/engines/table-engines/deltalakeazure.mdx" + }, + { + "route": "/reference/engines/table-engines/deltalakelocal", + "title": "DeltaLakeLocal", + "file": "reference-prototype/engines/table-engines/deltalakelocal.mdx" + }, + { + "route": "/reference/engines/table-engines/deltalakes3", + "title": "DeltaLakeS3", + "file": "reference-prototype/engines/table-engines/deltalakes3.mdx" + }, + { + "route": "/reference/engines/table-engines/executablepool", + "title": "ExecutablePool", + "file": "reference-prototype/engines/table-engines/executablepool.mdx" + }, + { + "route": "/reference/engines/table-engines/fuzzjson", + "title": "FuzzJSON", + "file": "reference-prototype/engines/table-engines/fuzzjson.mdx" + }, + { + "route": "/reference/engines/table-engines/fuzzquery", + "title": "FuzzQuery", + "file": "reference-prototype/engines/table-engines/fuzzquery.mdx" + }, + { + "route": "/reference/engines/table-engines/gcs", + "title": "GCS", + "file": "reference-prototype/engines/table-engines/gcs.mdx" + }, + { + "route": "/reference/engines/table-engines/icebergazure", + "title": "IcebergAzure", + "file": "reference-prototype/engines/table-engines/icebergazure.mdx" + }, + { + "route": "/reference/engines/table-engines/iceberghdfs", + "title": "IcebergHDFS", + "file": "reference-prototype/engines/table-engines/iceberghdfs.mdx" + }, + { + "route": "/reference/engines/table-engines/iceberglocal", + "title": "IcebergLocal", + "file": "reference-prototype/engines/table-engines/iceberglocal.mdx" + }, + { + "route": "/reference/engines/table-engines/icebergs3", + "title": "IcebergS3", + "file": "reference-prototype/engines/table-engines/icebergs3.mdx" + }, + { + "route": "/reference/engines/table-engines/loop", + "title": "Loop", + "file": "reference-prototype/engines/table-engines/loop.mdx" + }, + { + "route": "/reference/engines/table-engines/materializedview", + "title": "MaterializedView", + "file": "reference-prototype/engines/table-engines/materializedview.mdx" + }, + { + "route": "/reference/engines/table-engines/oss", + "title": "OSS", + "file": "reference-prototype/engines/table-engines/oss.mdx" + }, + { + "route": "/reference/engines/table-engines/paimonazure", + "title": "PaimonAzure", + "file": "reference-prototype/engines/table-engines/paimonazure.mdx" + }, + { + "route": "/reference/engines/table-engines/paimonhdfs", + "title": "PaimonHDFS", + "file": "reference-prototype/engines/table-engines/paimonhdfs.mdx" + }, + { + "route": "/reference/engines/table-engines/paimonlocal", + "title": "PaimonLocal", + "file": "reference-prototype/engines/table-engines/paimonlocal.mdx" + }, + { + "route": "/reference/engines/table-engines/paimons3", + "title": "PaimonS3", + "file": "reference-prototype/engines/table-engines/paimons3.mdx" + }, + { + "route": "/reference/engines/table-engines/remote", + "title": "Remote", + "file": "reference-prototype/engines/table-engines/remote.mdx" + }, + { + "route": "/reference/engines/table-engines/remotesecure", + "title": "RemoteSecure", + "file": "reference-prototype/engines/table-engines/remotesecure.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedaggregatingmergetree", + "title": "ReplicatedAggregatingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedaggregatingmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedcoalescingmergetree", + "title": "ReplicatedCoalescingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedcoalescingmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedcollapsingmergetree", + "title": "ReplicatedCollapsingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedcollapsingmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedgraphitemergetree", + "title": "ReplicatedGraphiteMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedgraphitemergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedmergetree", + "title": "ReplicatedMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedreplacingmergetree", + "title": "ReplicatedReplacingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedreplacingmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedsummingmergetree", + "title": "ReplicatedSummingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedsummingmergetree.mdx" + }, + { + "route": "/reference/engines/table-engines/replicatedversionedcollapsingmergetree", + "title": "ReplicatedVersionedCollapsingMergeTree", + "file": "reference-prototype/engines/table-engines/replicatedversionedcollapsingmergetree.mdx" + }, + { + "route": "/reference/formats/jsonl", + "title": "JSONL", + "file": "reference-prototype/formats/jsonl.mdx" + }, + { + "route": "/reference/formats/md", + "title": "MD", + "file": "reference-prototype/formats/md.mdx" + }, + { + "route": "/reference/formats/ndjson", + "title": "NDJSON", + "file": "reference-prototype/formats/ndjson.mdx" + }, + { + "route": "/reference/formats/prettyjsonlines", + "title": "PrettyJSONLines", + "file": "reference-prototype/formats/prettyjsonlines.mdx" + }, + { + "route": "/reference/formats/prettyndjson", + "title": "PrettyNDJSON", + "file": "reference-prototype/formats/prettyndjson.mdx" + }, + { + "route": "/reference/formats/raw", + "title": "Raw", + "file": "reference-prototype/formats/raw.mdx" + }, + { + "route": "/reference/formats/rawwithnames", + "title": "RawWithNames", + "file": "reference-prototype/formats/rawwithnames.mdx" + }, + { + "route": "/reference/formats/rawwithnamesandtypes", + "title": "RawWithNamesAndTypes", + "file": "reference-prototype/formats/rawwithnamesandtypes.mdx" + }, + { + "route": "/reference/formats/tsv", + "title": "TSV", + "file": "reference-prototype/formats/tsv.mdx" + }, + { + "route": "/reference/formats/tsvraw", + "title": "TSVRaw", + "file": "reference-prototype/formats/tsvraw.mdx" + }, + { + "route": "/reference/formats/tsvrawwithnames", + "title": "TSVRawWithNames", + "file": "reference-prototype/formats/tsvrawwithnames.mdx" + }, + { + "route": "/reference/formats/tsvrawwithnamesandtypes", + "title": "TSVRawWithNamesAndTypes", + "file": "reference-prototype/formats/tsvrawwithnamesandtypes.mdx" + }, + { + "route": "/reference/formats/tsvwithnames", + "title": "TSVWithNames", + "file": "reference-prototype/formats/tsvwithnames.mdx" + }, + { + "route": "/reference/formats/tsvwithnamesandtypes", + "title": "TSVWithNamesAndTypes", + "file": "reference-prototype/formats/tsvwithnamesandtypes.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/anova", + "title": "anova", + "file": "reference-prototype/functions/aggregate-functions/anova.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/any-respect-nulls", + "title": "any_respect_nulls", + "file": "reference-prototype/functions/aggregate-functions/any-respect-nulls.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/any-value", + "title": "any_value", + "file": "reference-prototype/functions/aggregate-functions/any-value.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/anylast-respect-nulls", + "title": "anyLast_respect_nulls", + "file": "reference-prototype/functions/aggregate-functions/anylast-respect-nulls.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/anyvaluerespectnulls", + "title": "anyValueRespectNulls", + "file": "reference-prototype/functions/aggregate-functions/anyvaluerespectnulls.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/approx-top-count", + "title": "approx_top_count", + "file": "reference-prototype/functions/aggregate-functions/approx-top-count.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/array-agg", + "title": "array_agg", + "file": "reference-prototype/functions/aggregate-functions/array-agg.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/array-concat-agg", + "title": "array_concat_agg", + "file": "reference-prototype/functions/aggregate-functions/array-concat-agg.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/bit-and", + "title": "BIT_AND", + "file": "reference-prototype/functions/aggregate-functions/bit-and.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/bit-or", + "title": "BIT_OR", + "file": "reference-prototype/functions/aggregate-functions/bit-or.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/bit-xor", + "title": "BIT_XOR", + "file": "reference-prototype/functions/aggregate-functions/bit-xor.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/cume-dist", + "title": "cume_dist", + "file": "reference-prototype/functions/aggregate-functions/cume-dist.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/denserank", + "title": "denseRank", + "file": "reference-prototype/functions/aggregate-functions/denserank.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/firstvaluerespectnulls", + "title": "firstValueRespectNulls", + "file": "reference-prototype/functions/aggregate-functions/firstvaluerespectnulls.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/groupnumericindexedvector", + "title": "groupNumericIndexedVector", + "file": "reference-prototype/functions/aggregate-functions/groupnumericindexedvector.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/hierarchicalkmeans", + "title": "hierarchicalKMeans", + "file": "reference-prototype/functions/aggregate-functions/hierarchicalkmeans.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/histogram", + "title": "histogram", + "file": "reference-prototype/functions/aggregate-functions/histogram.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/lag", + "title": "lag", + "file": "reference-prototype/functions/aggregate-functions/lag.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/laginframe", + "title": "lagInFrame", + "file": "reference-prototype/functions/aggregate-functions/laginframe.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/lastvaluerespectnulls", + "title": "lastValueRespectNulls", + "file": "reference-prototype/functions/aggregate-functions/lastvaluerespectnulls.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/lead", + "title": "lead", + "file": "reference-prototype/functions/aggregate-functions/lead.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/leadinframe", + "title": "leadInFrame", + "file": "reference-prototype/functions/aggregate-functions/leadinframe.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/lttb", + "title": "lttb", + "file": "reference-prototype/functions/aggregate-functions/lttb.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/max-by", + "title": "max_by", + "file": "reference-prototype/functions/aggregate-functions/max-by.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianbfloat16", + "title": "medianBFloat16", + "file": "reference-prototype/functions/aggregate-functions/medianbfloat16.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianbfloat16weighted", + "title": "medianBFloat16Weighted", + "file": "reference-prototype/functions/aggregate-functions/medianbfloat16weighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediandd", + "title": "medianDD", + "file": "reference-prototype/functions/aggregate-functions/mediandd.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediandeterministic", + "title": "medianDeterministic", + "file": "reference-prototype/functions/aggregate-functions/mediandeterministic.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianexact", + "title": "medianExact", + "file": "reference-prototype/functions/aggregate-functions/medianexact.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianexacthigh", + "title": "medianExactHigh", + "file": "reference-prototype/functions/aggregate-functions/medianexacthigh.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianexactlow", + "title": "medianExactLow", + "file": "reference-prototype/functions/aggregate-functions/medianexactlow.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianexactweighted", + "title": "medianExactWeighted", + "file": "reference-prototype/functions/aggregate-functions/medianexactweighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianexactweightedinterpolated", + "title": "medianExactWeightedInterpolated", + "file": "reference-prototype/functions/aggregate-functions/medianexactweightedinterpolated.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediangk", + "title": "medianGK", + "file": "reference-prototype/functions/aggregate-functions/mediangk.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/medianinterpolatedweighted", + "title": "medianInterpolatedWeighted", + "file": "reference-prototype/functions/aggregate-functions/medianinterpolatedweighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediantdigest", + "title": "medianTDigest", + "file": "reference-prototype/functions/aggregate-functions/mediantdigest.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediantdigestweighted", + "title": "medianTDigestWeighted", + "file": "reference-prototype/functions/aggregate-functions/mediantdigestweighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediantiming", + "title": "medianTiming", + "file": "reference-prototype/functions/aggregate-functions/mediantiming.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mediantimingweighted", + "title": "medianTimingWeighted", + "file": "reference-prototype/functions/aggregate-functions/mediantimingweighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mergedjsonpatch", + "title": "mergedJSONPatch", + "file": "reference-prototype/functions/aggregate-functions/mergedjsonpatch.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/min-by", + "title": "min_by", + "file": "reference-prototype/functions/aggregate-functions/min-by.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/mvtencode", + "title": "MVTEncode", + "file": "reference-prototype/functions/aggregate-functions/mvtencode.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/nonnegativederivative", + "title": "nonNegativeDerivative", + "file": "reference-prototype/functions/aggregate-functions/nonnegativederivative.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/nothing", + "title": "nothing", + "file": "reference-prototype/functions/aggregate-functions/nothing.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/nothingnull", + "title": "nothingNull", + "file": "reference-prototype/functions/aggregate-functions/nothingnull.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/nothinguint64", + "title": "nothingUInt64", + "file": "reference-prototype/functions/aggregate-functions/nothinguint64.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/nth-value", + "title": "nth_value", + "file": "reference-prototype/functions/aggregate-functions/nth-value.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/ntile", + "title": "ntile", + "file": "reference-prototype/functions/aggregate-functions/ntile.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/percentrank", + "title": "percentRank", + "file": "reference-prototype/functions/aggregate-functions/percentrank.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/quantilebfloat16weighted", + "title": "quantileBFloat16Weighted", + "file": "reference-prototype/functions/aggregate-functions/quantilebfloat16weighted.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/rank", + "title": "rank", + "file": "reference-prototype/functions/aggregate-functions/rank.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-avgx", + "title": "regr_avgx", + "file": "reference-prototype/functions/aggregate-functions/regr-avgx.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-avgy", + "title": "regr_avgy", + "file": "reference-prototype/functions/aggregate-functions/regr-avgy.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-count", + "title": "regr_count", + "file": "reference-prototype/functions/aggregate-functions/regr-count.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-intercept", + "title": "regr_intercept", + "file": "reference-prototype/functions/aggregate-functions/regr-intercept.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-r2", + "title": "regr_r2", + "file": "reference-prototype/functions/aggregate-functions/regr-r2.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-slope", + "title": "regr_slope", + "file": "reference-prototype/functions/aggregate-functions/regr-slope.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-sxx", + "title": "regr_sxx", + "file": "reference-prototype/functions/aggregate-functions/regr-sxx.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-sxy", + "title": "regr_sxy", + "file": "reference-prototype/functions/aggregate-functions/regr-sxy.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/regr-syy", + "title": "regr_syy", + "file": "reference-prototype/functions/aggregate-functions/regr-syy.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/retention", + "title": "retention", + "file": "reference-prototype/functions/aggregate-functions/retention.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/row-number", + "title": "row_number", + "file": "reference-prototype/functions/aggregate-functions/row-number.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/sequencecount", + "title": "sequenceCount", + "file": "reference-prototype/functions/aggregate-functions/sequencecount.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/sequencematch", + "title": "sequenceMatch", + "file": "reference-prototype/functions/aggregate-functions/sequencematch.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/sequencematchevents", + "title": "sequenceMatchEvents", + "file": "reference-prototype/functions/aggregate-functions/sequencematchevents.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/sequencenextnode", + "title": "sequenceNextNode", + "file": "reference-prototype/functions/aggregate-functions/sequencenextnode.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/st-asmvt", + "title": "ST_AsMVT", + "file": "reference-prototype/functions/aggregate-functions/st-asmvt.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/std", + "title": "STD", + "file": "reference-prototype/functions/aggregate-functions/std.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/stddev", + "title": "STDDEV", + "file": "reference-prototype/functions/aggregate-functions/stddev.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/string-agg", + "title": "string_agg", + "file": "reference-prototype/functions/aggregate-functions/string-agg.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/summapfiltered", + "title": "sumMapFiltered", + "file": "reference-prototype/functions/aggregate-functions/summapfiltered.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/summapfilteredwithoverflow", + "title": "sumMapFilteredWithOverflow", + "file": "reference-prototype/functions/aggregate-functions/summapfilteredwithoverflow.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesavgtogrid", + "title": "timeSeriesAvgToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesavgtogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesbottomkmasks", + "title": "timeSeriesBottomKMasks", + "file": "reference-prototype/functions/aggregate-functions/timeseriesbottomkmasks.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriescounttogrid", + "title": "timeSeriesCountToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriescounttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesfirsttogrid", + "title": "timeSeriesFirstToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesfirsttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesincreasetogrid", + "title": "timeSeriesIncreaseToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesincreasetogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeserieslasttogrid", + "title": "timeSeriesLastToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeserieslasttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeserieslimitkmasks", + "title": "timeSeriesLimitKMasks", + "file": "reference-prototype/functions/aggregate-functions/timeserieslimitkmasks.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeserieslinearregressiontogrid", + "title": "timeSeriesLinearRegressionToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeserieslinearregressiontogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesmadtogrid", + "title": "timeSeriesMadToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesmadtogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesmaxtogrid", + "title": "timeSeriesMaxToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesmaxtogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesmintogrid", + "title": "timeSeriesMinToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesmintogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriespresenttogrid", + "title": "timeSeriesPresentToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriespresenttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriesquantiletogrid", + "title": "timeSeriesQuantileToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriesquantiletogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriessumtogrid", + "title": "timeSeriesSumToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriessumtogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriestimestampoffirsttogrid", + "title": "timeSeriesTimestampOfFirstToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriestimestampoffirsttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriestimestampoflasttogrid", + "title": "timeSeriesTimestampOfLastToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriestimestampoflasttogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriestimestampofmaxtogrid", + "title": "timeSeriesTimestampOfMaxToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriestimestampofmaxtogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriestimestampofmintogrid", + "title": "timeSeriesTimestampOfMinToGrid", + "file": "reference-prototype/functions/aggregate-functions/timeseriestimestampofmintogrid.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/timeseriestopkmasks", + "title": "timeSeriesTopKMasks", + "file": "reference-prototype/functions/aggregate-functions/timeseriestopkmasks.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/uniqupto", + "title": "uniqUpTo", + "file": "reference-prototype/functions/aggregate-functions/uniqupto.mdx" + }, + { + "route": "/reference/functions/aggregate-functions/windowfunnel", + "title": "windowFunnel", + "file": "reference-prototype/functions/aggregate-functions/windowfunnel.mdx" + }, + { + "route": "/reference/functions/regular-functions/embedded-dictionary-functions", + "title": "Embedded Dictionary functions", + "file": "reference-prototype/functions/regular-functions/embedded-dictionary-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo-functions", + "title": "Geo functions", + "file": "reference-prototype/functions/regular-functions/geo-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/geo-polygon-functions", + "title": "Geo Polygon functions", + "file": "reference-prototype/functions/regular-functions/geo-polygon-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/qbit-functions", + "title": "QBit functions", + "file": "reference-prototype/functions/regular-functions/qbit-functions.mdx" + }, + { + "route": "/reference/functions/table-functions/arrowflight-2", + "title": "arrowFlight", + "file": "reference-prototype/functions/table-functions/arrowflight-2.mdx" + }, + { + "route": "/reference/functions/table-functions/cluster-2", + "title": "clusterAllReplicas", + "file": "reference-prototype/functions/table-functions/cluster-2.mdx" + }, + { + "route": "/reference/functions/table-functions/cosn", + "title": "cosn", + "file": "reference-prototype/functions/table-functions/cosn.mdx" + }, + { + "route": "/reference/functions/table-functions/deltalakeazure", + "title": "deltaLakeAzure", + "file": "reference-prototype/functions/table-functions/deltalakeazure.mdx" + }, + { + "route": "/reference/functions/table-functions/deltalakeazurecluster", + "title": "deltaLakeAzureCluster", + "file": "reference-prototype/functions/table-functions/deltalakeazurecluster.mdx" + }, + { + "route": "/reference/functions/table-functions/deltalakelocal", + "title": "deltaLakeLocal", + "file": "reference-prototype/functions/table-functions/deltalakelocal.mdx" + }, + { + "route": "/reference/functions/table-functions/deltalakes3", + "title": "deltaLakeS3", + "file": "reference-prototype/functions/table-functions/deltalakes3.mdx" + }, + { + "route": "/reference/functions/table-functions/deltalakes3cluster", + "title": "deltaLakeS3Cluster", + "file": "reference-prototype/functions/table-functions/deltalakes3cluster.mdx" + }, + { + "route": "/reference/functions/table-functions/generate_series-2", + "title": "generateSeries", + "file": "reference-prototype/functions/table-functions/generate_series-2.mdx" + }, + { + "route": "/reference/functions/table-functions/hive", + "title": "hive", + "file": "reference-prototype/functions/table-functions/hive.mdx" + }, + { + "route": "/reference/functions/table-functions/icebergazure", + "title": "icebergAzure", + "file": "reference-prototype/functions/table-functions/icebergazure.mdx" + }, + { + "route": "/reference/functions/table-functions/icebergazurecluster", + "title": "icebergAzureCluster", + "file": "reference-prototype/functions/table-functions/icebergazurecluster.mdx" + }, + { + "route": "/reference/functions/table-functions/iceberghdfs", + "title": "icebergHDFS", + "file": "reference-prototype/functions/table-functions/iceberghdfs.mdx" + }, + { + "route": "/reference/functions/table-functions/iceberghdfscluster", + "title": "icebergHDFSCluster", + "file": "reference-prototype/functions/table-functions/iceberghdfscluster.mdx" + }, + { + "route": "/reference/functions/table-functions/iceberglocal", + "title": "icebergLocal", + "file": "reference-prototype/functions/table-functions/iceberglocal.mdx" + }, + { + "route": "/reference/functions/table-functions/iceberglocalcluster", + "title": "icebergLocalCluster", + "file": "reference-prototype/functions/table-functions/iceberglocalcluster.mdx" + }, + { + "route": "/reference/functions/table-functions/icebergs3", + "title": "icebergS3", + "file": "reference-prototype/functions/table-functions/icebergs3.mdx" + }, + { + "route": "/reference/functions/table-functions/icebergs3cluster", + "title": "icebergS3Cluster", + "file": "reference-prototype/functions/table-functions/icebergs3cluster.mdx" + }, + { + "route": "/reference/functions/table-functions/mergetreeanalyzeindexes", + "title": "mergeTreeAnalyzeIndexes", + "file": "reference-prototype/functions/table-functions/mergetreeanalyzeindexes.mdx" + }, + { + "route": "/reference/functions/table-functions/mergetreeanalyzeindexesuuid", + "title": "mergeTreeAnalyzeIndexesUUID", + "file": "reference-prototype/functions/table-functions/mergetreeanalyzeindexesuuid.mdx" + }, + { + "route": "/reference/functions/table-functions/numbers-mt", + "title": "numbers_mt", + "file": "reference-prototype/functions/table-functions/numbers-mt.mdx" + }, + { + "route": "/reference/functions/table-functions/oss", + "title": "oss", + "file": "reference-prototype/functions/table-functions/oss.mdx" + }, + { + "route": "/reference/functions/table-functions/paimonazure", + "title": "paimonAzure", + "file": "reference-prototype/functions/table-functions/paimonazure.mdx" + }, + { + "route": "/reference/functions/table-functions/paimonazurecluster", + "title": "paimonAzureCluster", + "file": "reference-prototype/functions/table-functions/paimonazurecluster.mdx" + }, + { + "route": "/reference/functions/table-functions/paimonhdfs", + "title": "paimonHDFS", + "file": "reference-prototype/functions/table-functions/paimonhdfs.mdx" + }, + { + "route": "/reference/functions/table-functions/paimonhdfscluster", + "title": "paimonHDFSCluster", + "file": "reference-prototype/functions/table-functions/paimonhdfscluster.mdx" + }, + { + "route": "/reference/functions/table-functions/paimonlocal", + "title": "paimonLocal", + "file": "reference-prototype/functions/table-functions/paimonlocal.mdx" + }, + { + "route": "/reference/functions/table-functions/paimons3", + "title": "paimonS3", + "file": "reference-prototype/functions/table-functions/paimons3.mdx" + }, + { + "route": "/reference/functions/table-functions/paimons3cluster", + "title": "paimonS3Cluster", + "file": "reference-prototype/functions/table-functions/paimons3cluster.mdx" + }, + { + "route": "/reference/functions/table-functions/remotesecure", + "title": "remoteSecure", + "file": "reference-prototype/functions/table-functions/remotesecure.mdx" + }, + { + "route": "/reference/functions/table-functions/sqlstandardvalues", + "title": "SQLStandardValues", + "file": "reference-prototype/functions/table-functions/sqlstandardvalues.mdx" + }, + { + "route": "/reference/functions/table-functions/timeseriesmetricfamilies", + "title": "timeSeriesMetricFamilies", + "file": "reference-prototype/functions/table-functions/timeseriesmetricfamilies.mdx" + }, + { + "route": "/reference/functions/table-functions/viewexplain", + "title": "viewExplain", + "file": "reference-prototype/functions/table-functions/viewexplain.mdx" + }, + { + "route": "/reference/functions/table-functions/viewifpermitted", + "title": "viewIfPermitted", + "file": "reference-prototype/functions/table-functions/viewifpermitted.mdx" + }, + { + "route": "/reference/functions/table-functions/zeros-mt", + "title": "zeros_mt", + "file": "reference-prototype/functions/table-functions/zeros-mt.mdx" + }, + { + "route": "/reference/functions/window-functions/reference-index", + "title": "Window function reference", + "file": "reference-prototype/functions/window-functions/reference-index.mdx" + }, + { + "route": "/reference/interfaces", + "title": "Interfaces", + "file": "reference-prototype/interfaces.mdx" + }, + { + "route": "/reference/statements/create-token", + "title": "CREATE TOKEN", + "file": "reference-prototype/statements/create-token.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts", + "title": "Dictionary layouts", + "file": "reference-prototype/statements/create/dictionary/layouts.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/complex-key-cache", + "title": "complex_key_cache", + "file": "reference-prototype/statements/create/dictionary/layouts/complex-key-cache.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/direct-2", + "title": "direct", + "file": "reference-prototype/statements/create/dictionary/layouts/direct-2.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/hashed-2", + "title": "complex_key_sparse_hashed", + "file": "reference-prototype/statements/create/dictionary/layouts/hashed-2.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/hashed-3", + "title": "hashed", + "file": "reference-prototype/statements/create/dictionary/layouts/hashed-3.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/hashed-4", + "title": "sparse_hashed", + "file": "reference-prototype/statements/create/dictionary/layouts/hashed-4.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/hashed-array-2", + "title": "hashed_array", + "file": "reference-prototype/statements/create/dictionary/layouts/hashed-array-2.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/polygon-index-cell", + "title": "polygon_index_cell", + "file": "reference-prototype/statements/create/dictionary/layouts/polygon-index-cell.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/polygon-index-each", + "title": "polygon_index_each", + "file": "reference-prototype/statements/create/dictionary/layouts/polygon-index-each.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/polygon-simple", + "title": "polygon_simple", + "file": "reference-prototype/statements/create/dictionary/layouts/polygon-simple.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/range-hashed-2", + "title": "range_hashed", + "file": "reference-prototype/statements/create/dictionary/layouts/range-hashed-2.mdx" + }, + { + "route": "/reference/statements/create/dictionary/layouts/ssd-cache-2", + "title": "ssd_cache", + "file": "reference-prototype/statements/create/dictionary/layouts/ssd-cache-2.mdx" + }, + { + "route": "/reference/statements/create/dictionary/sources", + "title": "Dictionary sources", + "file": "reference-prototype/statements/create/dictionary/sources.mdx" + }, + { + "route": "/reference/statements/create/dictionary/sources/jdbc", + "title": "jdbc", + "file": "reference-prototype/statements/create/dictionary/sources/jdbc.mdx" + }, + { + "route": "/reference/statements/hypothetical-projection", + "title": "HYPOTHETICAL PROJECTION", + "file": "reference-prototype/statements/hypothetical-projection.mdx" + }, + { + "route": "/reference/system-tables", + "title": "System tables", + "file": "reference-prototype/system-tables.mdx" + }, + { + "route": "/reference/system-tables/hypothetical-projections", + "title": "hypothetical_projections", + "file": "reference-prototype/system-tables/hypothetical-projections.mdx" + }, + { + "route": "/reference/system-tables/jemalloc-arena-bins", + "title": "jemalloc_arena_bins", + "file": "reference-prototype/system-tables/jemalloc-arena-bins.mdx" + }, + { + "route": "/reference/system-tables/jemalloc-sampled-allocations", + "title": "jemalloc_sampled_allocations", + "file": "reference-prototype/system-tables/jemalloc-sampled-allocations.mdx" + }, + { + "route": "/reference/system-tables/session-query-ids", + "title": "session_query_ids", + "file": "reference-prototype/system-tables/session-query-ids.mdx" + } + ], + "currentAutogeneratedRoutesNotGenerated": [ + { + "route": "/reference/formats/DWARF", + "title": "DWARF", + "file": "reference/formats/DWARF.mdx" + }, + { + "route": "/reference/functions/regular-functions/embedded-dict-functions", + "title": "Functions for Working with Embedded Dictionaries", + "file": "reference/functions/regular-functions/embedded-dict-functions.mdx" + }, + { + "route": "/reference/functions/regular-functions/uniqtheta-functions", + "title": "uniqTheta Functions", + "file": "reference/functions/regular-functions/uniqtheta-functions.mdx" + }, + { + "route": "/reference/settings/beta-and-experimental-features", + "title": "Beta and experimental features", + "file": "reference/settings/beta-and-experimental-features.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/in-memory", + "title": "in_memory_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/in-memory.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/kill-delay-period", + "title": "kill_delay_period_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/kill-delay-period.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/max-part", + "title": "max_part_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/max-part.mdx" + }, + { + "route": "/reference/settings/merge-tree-settings/write-ahead", + "title": "write_ahead_* MergeTree table settings", + "file": "reference/settings/merge-tree-settings/write-ahead.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/access-control", + "title": "access_control_* server settings", + "file": "reference/settings/server-settings/settings/access-control.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/custom", + "title": "custom_* server settings", + "file": "reference/settings/server-settings/settings/custom.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/graphite", + "title": "graphite_* server settings", + "file": "reference/settings/server-settings/settings/graphite.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/query", + "title": "query_* server settings", + "file": "reference/settings/server-settings/settings/query.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/remote", + "title": "remote_* server settings", + "file": "reference/settings/server-settings/settings/remote.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/tcp-port", + "title": "tcp_port_* server settings", + "file": "reference/settings/server-settings/settings/tcp-port.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/user-defined", + "title": "user_defined_* server settings", + "file": "reference/settings/server-settings/settings/user-defined.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/workload", + "title": "workload_* server settings", + "file": "reference/settings/server-settings/settings/workload.mdx" + }, + { + "route": "/reference/settings/server-settings/settings/zookeeper", + "title": "zookeeper_* server settings", + "file": "reference/settings/server-settings/settings/zookeeper.mdx" + }, + { + "route": "/reference/system-tables/delta_lake_metadata_log", + "title": "system.delta_lake_metadata_log", + "file": "reference/system-tables/delta_lake_metadata_log.mdx" + }, + { + "route": "/reference/system-tables/histogram_metric_log", + "title": "system.histogram_metric_log", + "file": "reference/system-tables/histogram_metric_log.mdx" + }, + { + "route": "/reference/system-tables/information_schema", + "title": "INFORMATION_SCHEMA", + "file": "reference/system-tables/information_schema.mdx" + }, + { + "route": "/reference/system-tables/instrumentation", + "title": "system.instrumentation", + "file": "reference/system-tables/instrumentation.mdx" + }, + { + "route": "/reference/system-tables/models", + "title": "system.models", + "file": "reference/system-tables/models.mdx" + } + ] +} diff --git a/reports/reference-prototype-route-audit.md b/reports/reference-prototype-route-audit.md new file mode 100644 index 000000000..5e9b4dcf9 --- /dev/null +++ b/reports/reference-prototype-route-audit.md @@ -0,0 +1,192 @@ +# Reference prototype route audit + +Generated from the current `reference/` tree and the snapshot-derived `reference-prototype/` tree. Routes are file-derived Nimbus URLs, not frontmatter `slug` values. + +This is a **route-coverage** audit, not a content-provenance audit. A route without a generated counterpart can still be fully backed by one or more `system.documentation` or component-system-table records; it needs a legacy-route rule or a derived-page template. + +## Summary + +| Measure | Count | +| --- | ---: | +| Current reference pages | 1318 | +| Current pages with autogenerated blocks | 1240 | +| Current site-owned pages (no generated region) | 78 | +| Current pages with website content outside a generated region | 251 | +| Current marker-wrapped pages | 989 | +| Legacy generated-body routes without a rendered URL or safe mechanical mapping | 22 | +| Classified compatibility exceptions | 22 | +| Intentional snapshot omissions | 14 | +| Unclassified compatibility exceptions | 0 | +| Snapshot-generated pages | 1495 | +| Exact current/generated route matches | 1247 | +| New generated routes | 248 | +| Current generated-body routes without an exact rendered URL | 22 | +| Mechanical normalized-route rename candidates | 0 | +| Unique title-based route candidates | 5 | +| Generated routes covered by an exact match or safe candidate | 1252 | +| Current generated-body routes covered by an exact match or safe candidate | 1218 | +| Legacy generated-body routes still needing a renderer URL rule | 0 | + +## Current site-owned pages + +These are current pages without an `AUTOGENERATED_START` block. They need an explicit decision: retain as a site template, move outside generated reference, or add a snapshot/catalog rule. + +- `data-types`: 1 +- `data-types/data-types-binary-encoding`: 1 +- `data-types/domains`: 1 +- `data-types/nested-data-structures`: 1 +- `data-types/special-data-types`: 5 +- `datalakes`: 1 +- `engines/database-engines`: 1 +- `engines/engines`: 1 +- `engines/table-engines`: 9 +- `formats`: 1 +- `formats/JSON`: 1 +- `formats/Puffin`: 2 +- `functions`: 1 +- `functions/aggregate-functions`: 8 +- `functions/regular-functions`: 16 +- `functions/table-functions`: 3 +- `functions/window-functions`: 3 +- `home`: 1 +- `interfaces/specs`: 2 +- `operators`: 1 +- `operators/distributed-ddl`: 1 +- `operators/exists`: 1 +- `settings`: 1 +- `settings/formats`: 1 +- `settings/server-settings`: 1 +- `settings/session-settings`: 1 +- `statements`: 1 +- `statements/create`: 6 +- `syntax`: 1 +- `system-tables/keeper_storage`: 1 +- `system-tables/overview`: 1 +- `system-tables/system_warnings`: 1 +- `system-tables/zookeeper_watches`: 1 + +The full page list is in the JSON companion file. + +## Current pages with website content outside a generated region + +These current files have content outside an `AUTOGENERATED_START` region. This is a website-file layout observation, not a provenance classification. Content *inside* the marker—including explanatory prose—is generated from ClickHouse source via `system.documentation`. + +- `engines`: 4 +- `functions`: 75 +- `settings`: 2 +- `system-tables`: 170 + +The JSON companion contains every route, its source file, character count, and a short excerpt for review. + +## Statements: system-documentation inventory + +The Statements subtree has 131 current pages: 7 are unmarked website files and 124 have a system-generated body. The latter's full explanation is now embedded in the parser documentation and exported through `system.documentation`. + +### Unmarked Statement website files + +- `/reference/statements` +- `/reference/statements/create/dictionary/attributes` +- `/reference/statements/create/dictionary/embedded` +- `/reference/statements/create/dictionary/layouts/hierarchical` +- `/reference/statements/create/dictionary/layouts/overview` +- `/reference/statements/create/dictionary/lifetime` +- `/reference/statements/create/dictionary/sources/overview` + +All 124 marker-wrapped statement routes are in the JSON companion under `statements.markerWrappedRoutes`. + +## Legacy generated-body routes without a renderer mapping + +These are the migration-review candidates: they do not have an exact route, a mechanical slug equivalent, or a unique title match in the snapshot renderer. They require an explicit route rule, a site template, or an intentional redirect; they do not imply missing snapshot content. + +- `formats`: 1 +- `functions`: 2 +- `settings`: 14 +- `system-tables`: 5 + +## New generated routes by category + +- `data-types`: 40 +- `engines`: 38 +- `formats`: 14 +- `functions`: 133 +- `interfaces`: 1 +- `reference root`: 1 +- `statements`: 16 +- `system-tables`: 5 + +## Current generated-body routes without an exact rendered URL + +- `formats`: 1 +- `functions`: 2 +- `settings`: 14 +- `system-tables`: 5 + +## Exact matches by category + +- `data-types`: 30 +- `datalakes`: 1 +- `engines`: 69 +- `formats`: 100 +- `functions`: 278 +- `settings`: 477 +- `statements`: 125 +- `system-tables`: 167 + +## Legacy generated-body routes still needing a renderer URL rule + +These do not have an exact route, an underscore/case-only equivalent, or a unique title match. They are the initial set that needs a renderer rule, a retained site template, or an intentional redirect. They are not an inventory of hand-authored pages. + +- None + +## Classified compatibility exceptions + +These routes have an explicit disposition in the prototype route contract. The production snapshot must own the same metadata. + +- `/reference/formats/DWARF` — **feature-gated**: Current master registers format documentation only in builds that include the DWARF parser. +- `/reference/functions/regular-functions/embedded-dict-functions` — **retained-template**: A collection-level explanatory page; it is not one direct snapshot entity. +- `/reference/functions/regular-functions/uniqtheta-functions` — **retained-template**: A collection-level explanatory page; it is not one direct snapshot entity. +- `/reference/settings/beta-and-experimental-features` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/merge-tree-settings/in-memory` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/merge-tree-settings/kill-delay-period` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/merge-tree-settings/max-part` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/merge-tree-settings/write-ahead` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/access-control` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/custom` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/graphite` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/query` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/remote` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/tcp-port` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/user-defined` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/workload` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/settings/server-settings/settings/zookeeper` — **snapshot-omitted**: This group is absent from this snapshot. Do not render or redirect it: versioned reference routes and navigation reflect only the records present in the snapshot. +- `/reference/system-tables/delta_lake_metadata_log` — **redirect**: Redirect this alternate legacy URL to /reference/system-tables/delta_metadata_log. +- `/reference/system-tables/histogram_metric_log` — **retained-template**: Current master does not emit a system.documentation record for this page; it needs source metadata before it can become snapshot-owned. +- `/reference/system-tables/information_schema` — **derived**: INFORMATION_SCHEMA is a database of views, not a system table catalog record. +- `/reference/system-tables/instrumentation` — **feature-gated**: The table and its system.documentation record exist only in XRay-enabled builds. +- `/reference/system-tables/models` — **retained-historical**: system.models was removed; the page is intentionally historical. + +## High-confidence rename candidates + +These have a unique normalized route match — commonly underscore/case changes such as `build_options` → `build-options`. Preserve the current slug as the canonical route or add a permanent redirect before cutover. + +- None + +## Unique title-based candidates + +These share exactly one current title but have a different route. They require review: title equality is useful evidence, not a redirect rule by itself. + +- `/reference/engines/engines` → `/reference/engines` — Engines +- `/reference/functions/regular-functions/geo` → `/reference/functions/regular-functions/geo-functions` — Geo functions +- `/reference/functions/table-functions/cluster` → `/reference/functions/table-functions/cluster-2` — clusterAllReplicas +- `/reference/statements/create/dictionary/layouts/overview` → `/reference/statements/create/dictionary/layouts` — Dictionary layouts +- `/reference/statements/create/dictionary/sources/overview` → `/reference/statements/create/dictionary/sources` — Dictionary sources + +## Migration rule + +Do not let the renderer choose a slug solely from the system-table name. Give every generated record a route decision in the snapshot artifact: + +1. `canonicalRoute` — retain an existing public URL when one exists. +2. `redirectFrom` — include previous URLs only when the canonical route must change. +3. `source` — identify the system-table catalog or mark the page as site-owned. + +This turns the JSON audit into a CI gate: a new generated route or a missing current autogenerated route must be classified before a release snapshot is published. diff --git a/src/components.ts b/src/components.ts index e539d5b35..274007d08 100644 --- a/src/components.ts +++ b/src/components.ts @@ -8,6 +8,8 @@ import Render from "./components/Render.astro"; import { CardGrid } from "./components/ui/card-grid"; import { PackageManagers } from "./components/ui/package-managers"; import { TabItem } from "./components/ui/tabs"; +import SettingMetadata from "./components/SettingMetadata.astro"; +import { SettingsExplorer } from "./components/SettingsExplorer"; import { mintlifyGlobals } from "./components/compat/globals"; export const components = { @@ -15,6 +17,8 @@ export const components = { CardGrid, PackageManagers, Render, + SettingMetadata, + SettingsExplorer, TabItem, ...mintlifyGlobals, }; diff --git a/src/components/ArchivedReferenceBody.astro b/src/components/ArchivedReferenceBody.astro new file mode 100644 index 000000000..690f75bfe --- /dev/null +++ b/src/components/ArchivedReferenceBody.astro @@ -0,0 +1,240 @@ +--- +/** + * The historical reference-body transport. The surrounding layout stays in + * Astro; this client island fetches only a trusted, CI-produced HTML fragment. + */ +import { ArchivedSettingsExplorers } from "./ArchivedSettingsExplorers"; +const archiveOrigin = (import.meta.env.PUBLIC_REFERENCE_ARCHIVE_ORIGIN ?? "").replace(/\/$/, ""); +--- + +
+ +
+ + + + + diff --git a/src/components/ArchivedReferenceNavigation.astro b/src/components/ArchivedReferenceNavigation.astro new file mode 100644 index 000000000..86313b84f --- /dev/null +++ b/src/components/ArchivedReferenceNavigation.astro @@ -0,0 +1,211 @@ +--- +import { SidebarFilter } from "@/components/ui/sidebar"; +import AskAiButton from "@/components/AskAiButton.astro"; +import { SearchTrigger } from "@/components/ui/search"; +const archiveOrigin = (import.meta.env.PUBLIC_REFERENCE_ARCHIVE_ORIGIN ?? "").replace(/\/$/, ""); +--- + + + + + + diff --git a/src/components/ArchivedSettingsExplorers.tsx b/src/components/ArchivedSettingsExplorers.tsx new file mode 100644 index 000000000..0eaf8e137 --- /dev/null +++ b/src/components/ArchivedSettingsExplorers.tsx @@ -0,0 +1,38 @@ +import { useEffect } from "react"; +import { createRoot, type Root } from "react-dom/client"; +import { SettingsExplorer } from "./SettingsExplorer"; + +/** Mount the current explorer UI into versioned data placeholders in an archived body. */ +export function ArchivedSettingsExplorers() { + useEffect(() => { + const roots = new Map(); + + const mount = () => { + const placeholders = document.querySelectorAll("[data-reference-settings-explorer][data-reference-settings-index-url]"); + const active = new Set(placeholders); + roots.forEach((root, element) => { + if (active.has(element)) return; + root.unmount(); + roots.delete(element); + }); + placeholders.forEach((element) => { + if (roots.has(element)) return; + const indexUrl = element.dataset.referenceSettingsIndexUrl; + if (!indexUrl) return; + const root = createRoot(element); + roots.set(element, root); + root.render(); + }); + }; + + mount(); + document.addEventListener("reference:body-loaded", mount); + return () => { + document.removeEventListener("reference:body-loaded", mount); + roots.forEach((root) => root.unmount()); + roots.clear(); + }; + }, []); + + return null; +} diff --git a/src/components/Header.astro b/src/components/Header.astro index c91cd6b95..4bb56c266 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -10,8 +10,8 @@ import LocaleSwitcher from "./LocaleSwitcher.astro"; import AskAiButton from "./AskAiButton.astro"; import HomepageNavigation from "./HomepageNavigation.astro"; import HomepageNavbarCta from "./HomepageNavbarCta.astro"; -import HomepageLogoLight from "../../_site/logo/light.svg"; -import HomepageLogoDark from "../../_site/logo/dark.svg"; +import HomepageLogoLight from "../../_site/logo/light.svg?raw"; +import HomepageLogoDark from "../../_site/logo/dark.svg?raw"; import { uiStrings } from "@/lib/ui-strings.server"; interface Props { @@ -58,10 +58,10 @@ const messages = uiStrings(currentLocale); )}
- ClickHouse Docs - ClickHouse Docs + + - + {homepage && }
diff --git a/src/components/HomepageNavigation.astro b/src/components/HomepageNavigation.astro index 6eb40b84d..44961ff62 100644 --- a/src/components/HomepageNavigation.astro +++ b/src/components/HomepageNavigation.astro @@ -45,6 +45,10 @@ const remotePreview = readScope().remotePreview; function localHref(href: string): string { if (/^(https?:)?\/\//.test(href)) return href; + // The reference landing page moved from /reference/home to /reference. + // Keep the generated site-navigation input backwards compatible while the + // source navigation contract is migrated separately. + if (href === "/reference/home") return withBase("/reference"); if (remotePreview && (href === "/" || href === "")) return "https://clickhouse.com/docs/"; const localPath = href.startsWith("/") ? href : `/${href}`; const alreadyLocalized = localePrefix && ( @@ -60,6 +64,14 @@ function localHref(href: string): string { function hasCurrentPage(item: NavItem): boolean { if (item.link && localHref(item.link).replace(/\/+$/, "") === currentPath) return true; if (item.landing && localHref(item.landing).replace(/\/+$/, "") === currentPath) return true; + // The snapshot-driven reference microfrontend owns routes which do not + // necessarily appear as individual leaves in the authored navigation. They + // are nevertheless part of the Database section, just like the existing + // authored reference pages. + if (item.label === "Database") { + const referenceRoot = localHref("/reference").replace(/\/+$/, ""); + if (currentPath === referenceRoot || currentPath.startsWith(`${referenceRoot}/`)) return true; + } return item.items?.some(hasCurrentPage) ?? false; } diff --git a/src/components/MobileNavigation.astro b/src/components/MobileNavigation.astro index 73feecce9..add04db6f 100644 --- a/src/components/MobileNavigation.astro +++ b/src/components/MobileNavigation.astro @@ -40,10 +40,20 @@ const messages = uiStrings(Astro.props.currentLocale); function fillDrawer(dialog: HTMLDialogElement) { const target = dialog.querySelector("[data-nb-drawer-target]"); const source = document.querySelector("#desktop-sidebar nav"); - if (!target || !source || target.childElementCount > 0) return; + if (!target || !source) return; + // Astro preserves the dialog across client-side navigations. The source + // rail changes its current link and can change its shape, so never keep + // an old cloned tree in the drawer. + target.replaceChildren(); for (const child of Array.from(source.children)) { const clone = child.cloneNode(true) as HTMLElement; clone.removeAttribute("data-nb-sidebar-persist"); + // The drawer is an ephemeral clone of the desktop rail. Never copy + // Astro persistence keys into it: duplicate keys in the same page + // make the ClientRouter abort its DOM swap (including archive links). + clone.removeAttribute("data-astro-transition-persist"); + clone.querySelectorAll("[data-astro-transition-persist]") + .forEach((element) => element.removeAttribute("data-astro-transition-persist")); target.appendChild(clone); } target.querySelectorAll("[data-nb-sidebar-persist]").forEach((element) => element.removeAttribute("data-nb-sidebar-persist")); @@ -58,6 +68,30 @@ const messages = uiStrings(Astro.props.currentLocale); return () => cleanups.forEach((cleanup) => cleanup()); } + function collapseDrawerGroups(dialog: HTMLDialogElement) { + const groups = Array.from(dialog.querySelectorAll("[data-nb-sidebar-group]")).reverse(); + for (const group of groups) { + const trigger = Array.from(group.querySelectorAll("[data-nb-collapsible-trigger]")) + .find((candidate) => candidate.closest("[data-nb-sidebar-group]") === group); + // The Reference heading is a permanently expanded section wrapper, + // rather than a user-toggleable navigation tab. + if (!trigger) continue; + if (trigger?.getAttribute("data-nb-state") === "open") trigger.click(); + // An active route is rendered open by the server. Explicitly clear + // that rendered state after the disclosure callback so a filter reset + // leaves no visibly expanded sections in the drawer. + trigger.setAttribute("data-nb-state", "closed"); + trigger.setAttribute("aria-expanded", "false"); + const label = Array.from(group.querySelectorAll("[data-nb-sidebar-group-label]")) + .find((candidate) => candidate.closest("[data-nb-sidebar-group]") === group); + label?.setAttribute("data-nb-state", "closed"); + const content = Array.from(group.querySelectorAll("[data-nb-collapsible-content]")) + .find((candidate) => candidate.closest("[data-nb-sidebar-group]") === group); + content?.setAttribute("data-nb-state", "closed"); + content?.toggleAttribute("inert", true); + } + } + // mount() re-binds on every astro:page-load and tears down on // astro:before-swap, so the hamburger survives client-side navigation // (a one-shot module script would go dead after the first swap). @@ -78,7 +112,8 @@ const messages = uiStrings(Astro.props.currentLocale); } if (dialog.open) return; - disposeSidebar ??= fillDrawer(dialog); + disposeSidebar?.(); + disposeSidebar = fillDrawer(dialog); dialog.showModal(); dialog.dataset.state = "closed"; lockScroll(); @@ -131,6 +166,15 @@ const messages = uiStrings(Astro.props.currentLocale); if (e.target === dialog) closeSidebar(); }, { signal }); + // The drawer owns cloned disclosure controls. Run after its copied + // filter listener so clearing a query reliably returns this visible + // tree to its compact, all-collapsed state. + dialog.addEventListener("input", (event) => { + const target = event.target; + if (!(target instanceof HTMLInputElement) || !target.matches("[data-nb-sidebar-filter-input]") || target.value.trim()) return; + requestAnimationFrame(() => collapseDrawerGroups(dialog)); + }, { signal }); + return () => { controller.abort(); disposeSidebar?.(); diff --git a/src/components/MobileNavigationSections.astro b/src/components/MobileNavigationSections.astro index 87f8df9dc..6f7c26300 100644 --- a/src/components/MobileNavigationSections.astro +++ b/src/components/MobileNavigationSections.astro @@ -7,7 +7,13 @@ interface Props { currentLocale?: string; } const locale = localeRouteName(Astro.props.currentLocale ?? "en"); const items = loadGeneratedNavigation(locale).items; const path = Astro.url.pathname; -const menus = [sectionsFromConfig(items, path), mobileSectionsFromConfig(items, path)]; +// Keep the mobile section picker aligned with the new reference landing URL +// while the generated navigation contract still contains /reference/home. +const referenceLanding = (options: T[]) => options.map((item) => ({ + ...item, + href: item.href.replace(/\/reference\/home$/, "/reference"), +})); +const menus = [sectionsFromConfig(items, path), mobileSectionsFromConfig(items, path)].map(referenceLanding); ---
{menus.filter((options) => options.length).map((options) => ( diff --git a/src/components/ReferenceVersionPicker.astro b/src/components/ReferenceVersionPicker.astro new file mode 100644 index 000000000..9798f7773 --- /dev/null +++ b/src/components/ReferenceVersionPicker.astro @@ -0,0 +1,126 @@ +--- +/** + * Snapshot-version control for the reference explorer. + * + * The selector preserves the reference-relative route. This makes release + * comparison the default interaction: switching 26.9 → latest on an + * arithmetic-functions page opens the corresponding latest page, not home. + */ +interface Props { + currentVersion: string; +} + +const { currentVersion } = Astro.props; +// Leave this blank locally: Vite proxies the artifact store through the docs +// origin, matching the production `/docs/reference-artifacts` route. +const archiveOrigin = import.meta.env.PUBLIC_REFERENCE_ARCHIVE_ORIGIN ?? ""; +--- + +
+ + Head + + +
+ + diff --git a/src/components/SettingMetadata.astro b/src/components/SettingMetadata.astro new file mode 100644 index 000000000..34da8ca26 --- /dev/null +++ b/src/components/SettingMetadata.astro @@ -0,0 +1,18 @@ +--- +interface Props { + type?: string; + defaultValue?: string; + tier?: string; +} + +const { type, defaultValue, tier } = Astro.props; +--- + + diff --git a/src/components/SettingsExplorer.tsx b/src/components/SettingsExplorer.tsx new file mode 100644 index 000000000..24666bf95 --- /dev/null +++ b/src/components/SettingsExplorer.tsx @@ -0,0 +1,90 @@ +import { useEffect, useMemo, useState } from "react"; + +type Setting = { name: string; href: string; default?: string }; +type Group = { label: string; count: number; settings: Setting[] }; +type Index = { schemaVersion: 1; clickhouseVersion: string; displayPath: string; groups: Group[] }; + +function withDocsBase(value: string) { + if (typeof window === "undefined" || !window.location.pathname.startsWith("/docs")) return value; + // Snapshot artifacts served through the website worker already include the + // production base path. Generated Head indexes do not. + return value === "/docs" || value.startsWith("/docs/") ? value : `/docs${value}`; +} + +function terms(value: string) { + return value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/) + .filter((term) => term.length > 1).map((term) => term.length > 3 && term.endsWith("s") ? term.slice(0, -1) : term); +} + +function matches(value: string, query: string, queryTerms: string[]) { + if (!query) return true; + const candidate = value.toLowerCase(); + if (!query.includes("%")) return queryTerms.every((term) => terms(value).some((candidateTerm) => candidateTerm.startsWith(term))); + const parts = query.split("%"); + let position = 0; + for (let index = 0; index < parts.length; index += 1) { + const part = parts[index]; + if (!part) continue; + const match = candidate.indexOf(part, position); + if (match < 0 || (index === 0 && !query.startsWith("%") && match !== 0)) return false; + position = match + part.length; + } + const last = parts.at(-1); + return query.endsWith("%") || !last || position === candidate.length; +} + +export function SettingsExplorer({ indexUrl }: { indexUrl: string }) { + const [index, setIndex] = useState(); + const [failed, setFailed] = useState(false); + const [expanded, setExpanded] = useState>(() => new Set()); + const [search, setSearch] = useState(""); + + useEffect(() => { + const controller = new AbortController(); + fetch(withDocsBase(indexUrl), { signal: controller.signal }) + .then((response) => response.ok ? response.json() : Promise.reject(new Error(String(response.status)))) + .then((payload: Index) => { + if (payload.schemaVersion !== 1 || !Array.isArray(payload.groups)) throw new Error("Unsupported settings explorer index"); + setIndex(payload); + }) + .catch((reason: unknown) => { + if (!(reason instanceof DOMException && reason.name === "AbortError")) setFailed(true); + }); + return () => controller.abort(); + }, [indexUrl]); + + const normalized = search.trim().toLowerCase(); + const queryTerms = useMemo(() => terms(search), [search]); + const searching = normalized.includes("%") ? normalized.replaceAll("%", "").trim().length > 0 : queryTerms.length > 0; + const groups = useMemo(() => !index ? [] : (searching + ? index.groups.map((group) => { + const settings = group.settings.filter((setting) => matches(setting.name, normalized, queryTerms)); + return { ...group, settings, count: settings.length }; + }).filter((group) => group.count > 0) + : index.groups), [index, normalized, searching, queryTerms]); + const count = groups.reduce((total, group) => total + group.count, 0); + const allExpanded = groups.length > 0 && groups.every((group) => expanded.has(group.label)); + + if (!index) return
{failed ? "Settings explorer could not be loaded." : "Loading settings explorer…"}
; + + const toggleAll = () => setExpanded(allExpanded ? new Set() : new Set(index.groups.map((group) => group.label))); + + return
+
+ + setSearch(event.target.value)} placeholder="Search settings, e.g. parallel replicas or %materialized%" className="w-full rounded-lg border border-gray-500 bg-gray-50 py-2 pl-9 pr-3 text-sm text-gray-900 placeholder:text-gray-600 focus:border-gray-600 focus:outline-0 focus-visible:outline-0 dark:border-white/30 dark:bg-white/5 dark:text-white dark:placeholder:text-gray-400 dark:focus:border-[#fdff75]" /> +
+ {searching &&
{count} matching {count === 1 ? "setting" : "settings"}
} +
+
{index.displayPath}
+ {groups.length ? groups.map((group, groupIndex) => { + const open = searching || expanded.has(group.label); + const lastGroup = groupIndex === groups.length - 1; + return
+ + {open && group.settings.map((setting, settingIndex) =>
{setting.default !== undefined && (default: {setting.default})}
)} +
; + }) :
No matching settings
} +
+
; +} diff --git a/src/components/ui/search/SearchTrigger.astro b/src/components/ui/search/SearchTrigger.astro index f5dbd60cc..249b8f5d0 100644 --- a/src/components/ui/search/SearchTrigger.astro +++ b/src/components/ui/search/SearchTrigger.astro @@ -33,16 +33,32 @@ const messages = uiStrings(currentLocale); {sidebar ? messages.search.searchShort : messages.search.search} - - CtrlK + ⌘CtrlK + + diff --git a/src/components/ui/search/search-trigger.client.ts b/src/components/ui/search/search-trigger.client.ts index 7e75f014c..6602ecdd2 100644 --- a/src/components/ui/search/search-trigger.client.ts +++ b/src/components/ui/search/search-trigger.client.ts @@ -10,8 +10,8 @@ mount("[data-search-trigger]", (btn) => { : /mac|iphone|ipod|ipad/i.test(navigator.userAgent); if (isMac) { btn.setAttribute("aria-keyshortcuts", "Meta+K"); - const key = btn.querySelector("[data-shortcut-key]"); - if (key) key.textContent = "⌘"; + } else { + btn.setAttribute("aria-keyshortcuts", "Control+K"); } return () => {}; }); diff --git a/src/components/ui/sidebar/SidebarGroup.astro b/src/components/ui/sidebar/SidebarGroup.astro index 5aa787abc..b6fa4248d 100644 --- a/src/components/ui/sidebar/SidebarGroup.astro +++ b/src/components/ui/sidebar/SidebarGroup.astro @@ -105,7 +105,9 @@ const imageIcon = icon?.startsWith("/") ? inlinePublicIcon(icon) : undefined; {...attrs} > {section ? ( -

) : ( - ))} + ))} -

+
) : indexHref ? (
; scroll: number; + /** Retain an active filter while following a result to another page. */ + filter?: string; +} + +function readStoredState(): SidebarState | null { + try { + const raw = sessionStorage.getItem(STORAGE_KEY); + if (!raw) return null; + const value = JSON.parse(raw) as Partial; + return typeof value.hash === "string" && typeof value.open === "object" && typeof value.scroll === "number" + ? value as SidebarState + : null; + } catch { + return null; + } +} + +function saveFilter(root: HTMLElement, filter: string): void { + const hash = root.dataset.nbSidebarHash ?? ""; + if (!hash) return; + try { + const previous = readStoredState(); + const state: SidebarState = previous?.hash === hash + ? previous + : { hash, open: {}, scroll: 0 }; + state.filter = filter || undefined; + sessionStorage.setItem(STORAGE_KEY, JSON.stringify(state)); + } catch {} } function ownedTrigger(group: HTMLElement): HTMLElement | undefined { @@ -20,6 +48,11 @@ function ownedLabel(group: HTMLElement): HTMLElement | undefined { .find((candidate) => candidate.closest("[data-nb-sidebar-group]") === group); } +function ownedContent(group: HTMLElement): HTMLElement | undefined { + return Array.from(group.querySelectorAll("[data-nb-collapsible-content]")) + .find((candidate) => candidate.closest("[data-nb-sidebar-group]") === group); +} + function groupKey(group: HTMLElement): string { const labels: string[] = []; let current: HTMLElement | null = group; @@ -60,7 +93,9 @@ function initFilter(root: HTMLElement): (() => void) | null { if (!inputElement) return null; function handleInput() { - const query = inputElement!.value.trim().toLowerCase(); + const rawQuery = inputElement!.value.trim(); + const query = rawQuery.toLowerCase(); + saveFilter(root, rawQuery); if (!query) { resetFilter(root); return; @@ -79,27 +114,70 @@ function initFilter(root: HTMLElement): (() => void) | null { inputElement.addEventListener("input", handleInput); inputElement.addEventListener("keydown", handleKeydown); + // Astro replaces the page while following a filtered result. Restore the + // query on the replacement rail so the user stays in the same navigation + // context instead of being dropped into an unfiltered tree. + const storedFilter = readStoredState(); + const savedFilter = storedFilter && storedFilter.hash === root.dataset.nbSidebarHash + ? storedFilter.filter + : undefined; + if (savedFilter) { + inputElement.value = savedFilter; + handleInput(); + } + return () => { inputElement.removeEventListener("input", handleInput); inputElement.removeEventListener("keydown", handleKeydown); - resetFilter(root); + // Teardown also runs during Astro route swaps. A persisted reference + // explorer is deliberately retained through those swaps, so mutating its + // disclosure state here would make all of its top-level entries jump. + // `resetFilter` is reserved for an explicit user clear instead. }; } -function resetFilter(root: HTMLElement): void { - root.querySelectorAll("[data-nb-sidebar-hidden]").forEach((el) => { - el.removeAttribute("data-nb-sidebar-hidden"); - }); - // Reset groups opened by the filter back to their saved state. - root - .querySelectorAll("[data-nb-sidebar-group][data-nb-opened-by-filter]") +function collapseAllGroups(root: HTMLElement): void { + // Clearing a filter returns the explorer to a compact starting point. Do + // not retain the collection of branches that were opened only to reveal + // matches (or an active branch that was opened by a route transition). + // Descendants must close before their parents; a collapsed parent marks its + // panel inert, which would otherwise prevent a nested trigger from closing. + Array.from(root.querySelectorAll("[data-nb-sidebar-group]")) + .reverse() .forEach((group) => { const trigger = ownedTrigger(group); - trigger?.click(); + // Section headings such as "Reference" use the same container markup + // but intentionally have no trigger. They are the always-visible + // wrapper around the actual expandable tabs, not a tab themselves. + if (!trigger) return; + if (trigger?.getAttribute("data-nb-state") === "open") trigger.click(); + // Active pages initially open their ancestors on the server. Clearing a + // filter is an explicit request to leave that state, so enforce the + // collapsed DOM state after the disclosure callback has run. + group.setAttribute("data-nb-default-open", "false"); + trigger.setAttribute("data-nb-state", "closed"); + trigger.setAttribute("aria-expanded", "false"); + ownedLabel(group)?.setAttribute("data-nb-state", "closed"); + const content = ownedContent(group); + content?.setAttribute("data-nb-state", "closed"); + content?.toggleAttribute("inert", true); group.removeAttribute("data-nb-opened-by-filter"); }); } +function resetFilter(root: HTMLElement): void { + root.querySelectorAll("[data-nb-sidebar-hidden]").forEach((el) => { + el.removeAttribute("data-nb-sidebar-hidden"); + }); + collapseAllGroups(root); + // Disclosure bindings and the cloned mobile rail can finish their own + // updates later in this event turn. Make the explicit reset win after they + // have settled. + requestAnimationFrame(() => { + if (root.isConnected) collapseAllGroups(root); + }); +} + function applyFilter(root: HTMLElement, query: string): void { const links = root.querySelectorAll("[data-nb-sidebar-link]"); const groups = root.querySelectorAll("[data-nb-sidebar-group]"); @@ -144,6 +222,44 @@ function openGroup(group: HTMLElement): void { trigger.click(); } +function normalizePagePath(value: string): string { + try { + return new URL(value, window.location.origin).pathname.replace(/\/+$/, "") || "/"; + } catch { + return value.replace(/\/+$/, "") || "/"; + } +} + +/** + * A snapshot reference rail is preserved across Astro route swaps to avoid + * rebuilding its expanded branches (which visibly moves top-level rows). + * Keep its lightweight active marker current without changing disclosure + * state or the tree's dimensions. + */ +function syncPersistedSidebarCurrentPage(root: HTMLElement): void { + const currentPath = normalizePagePath(window.location.pathname); + const links = root.querySelectorAll( + "[data-nb-sidebar-link], [data-nb-sidebar-group-landing] > a", + ); + links.forEach((link) => { + const current = normalizePagePath(link.href) === currentPath; + if (current) link.setAttribute("aria-current", "page"); + else link.removeAttribute("aria-current"); + + const landing = link.closest("[data-nb-sidebar-group-landing]"); + if (landing) { + landing.classList.toggle("bg-accent", current); + landing.classList.toggle("text-foreground", current); + landing.classList.toggle("font-semibold", current); + } + }); + + root.querySelectorAll("[data-nb-sidebar-group]").forEach((group) => { + const hasCurrent = Boolean(group.querySelector("[aria-current='page']")); + ownedLabel(group)?.classList.toggle("is-active", hasCurrent); + }); +} + // --------------------------------------------------------------------------- // Persistence (open state + scroll) // --------------------------------------------------------------------------- @@ -157,6 +273,25 @@ function initPersistence(root: HTMLElement): (() => void) | null { root; const hash = root.dataset.nbSidebarHash ?? ""; + function preserveDisclosureDefault(event: MouseEvent): void { + const target = event.target; + if (!(target instanceof Element)) return; + const trigger = target.closest("[data-nb-collapsible-trigger]"); + const group = trigger?.closest("[data-nb-sidebar-group]"); + if (!trigger || !group || !root.contains(group)) return; + + // Nimbus remounts disclosure controls after an Astro navigation. Preserve + // the user's selection as their new default so a persisted tree does not + // silently collapse the branch that contains the destination page. + requestAnimationFrame(() => { + if (!group.isConnected) return; + group.setAttribute( + "data-nb-default-open", + trigger.getAttribute("data-nb-state") === "open" ? "true" : "false", + ); + }); + } + function handleLandingPageClick(event: MouseEvent): void { if ( event.defaultPrevented || @@ -183,6 +318,7 @@ function initPersistence(root: HTMLElement): (() => void) | null { } root.addEventListener("click", handleLandingPageClick); + root.addEventListener("click", preserveDisclosureDefault); function readState(): SidebarState { const groups = root.querySelectorAll("[data-nb-sidebar-group]"); @@ -193,7 +329,13 @@ function initPersistence(root: HTMLElement): (() => void) | null { // open. Recording them as open also repairs state written by older code. open[groupKey(group)] = !trigger || trigger.getAttribute("data-nb-state") === "open"; }); - return { hash, open, scroll: scrollHost.scrollTop }; + const previous = readStoredState(); + return { + hash, + open, + scroll: scrollHost.scrollTop, + filter: previous?.hash === hash ? previous.filter : undefined, + }; } function save() { @@ -228,6 +370,7 @@ function initPersistence(root: HTMLElement): (() => void) | null { return () => { observer.disconnect(); root.removeEventListener("click", handleLandingPageClick); + root.removeEventListener("click", preserveDisclosureDefault); document.removeEventListener("visibilitychange", handleVisibility); document.removeEventListener("astro:before-swap", save); window.removeEventListener("pagehide", save); @@ -265,3 +408,13 @@ function initPersistence(root: HTMLElement): (() => void) | null { })(); mount("[data-nb-sidebar]", initSidebar); + +if (!document.documentElement.hasAttribute("data-nb-sidebar-current-bound")) { + document.documentElement.setAttribute("data-nb-sidebar-current-bound", ""); + const sync = () => document + .querySelectorAll("[data-nb-sidebar-persist]") + .forEach(syncPersistedSidebarCurrentPage); + document.addEventListener("astro:after-swap", sync); + document.addEventListener("astro:page-load", sync); + sync(); +} diff --git a/src/components/ui/toc/TOC.astro b/src/components/ui/toc/TOC.astro index b38e8a00e..81d236d81 100644 --- a/src/components/ui/toc/TOC.astro +++ b/src/components/ui/toc/TOC.astro @@ -55,6 +55,7 @@ const messages = uiStrings(currentLocale); data-nb-slug={h.slug} class="no-underline" style={`--ch-toc-depth: ${indent};`} + title={h.text} > {h.text} diff --git a/src/content.config.ts b/src/content.config.ts index 367c65da6..e85f18b98 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -13,6 +13,7 @@ export const SECTIONS = [ "concepts", "guides", "reference", + "reference-prototype", "products", "clickstack", "integrations", @@ -81,7 +82,39 @@ export function pathId({ entry }: { entry: string }): string { // its sitemap canonical is `/folder`, so that is the page id here and // `/folder/index` becomes a redirect (bin/gen-redirects.ts). The root // `index.mdx` keeps the id `index`, which Nimbus expects. - const id = entry.replace(/\.(mdx?|md)$/i, ""); + const sourceId = entry.replace(/\.(mdx?|md)$/i, ""); + // The generated Head snapshot owns the public reference route whenever it + // has an equivalent source page. Keeping the authored copy in the content + // collection under that same id makes Astro choose either entry depending + // on loader order, which in turn swaps between the ordinary DocsLayout and + // the reference version shell during navigation. Retain the authored file + // for source/audit purposes, but give it a private collection id so it + // cannot compete for the public route. + const authoredReferenceRoute = sourceId.startsWith("reference/") + ? sourceId.slice("reference/".length).replace(/\/index$/, "") + : undefined; + const snapshotOwnsAuthoredReference = authoredReferenceRoute !== undefined && [ + `reference-prototype/latest/${authoredReferenceRoute}.md`, + `reference-prototype/latest/${authoredReferenceRoute}.mdx`, + `reference-prototype/latest/${authoredReferenceRoute}/index.md`, + `reference-prototype/latest/${authoredReferenceRoute}/index.mdx`, + ].some((candidate) => fs.existsSync(candidate)); + if (snapshotOwnsAuthoredReference) { + return `__snapshot-shadowed-reference__/${sourceId}`.replace(/\/index$/, ""); + } + // Keep the generated source isolated in `reference-prototype/`, while the + // scoped microfrontend preview publishes it at the real `/reference` mount. + // A prototype build excludes the authored `reference/` tree, preventing two + // sources from owning the same route. + const id = sourceId === "reference-prototype/latest" + ? "reference" + : sourceId.startsWith("reference-prototype/latest/") + ? `reference/${sourceId.slice("reference-prototype/latest/".length)}` + : sourceId === "reference-prototype" + ? "reference" + : sourceId.startsWith("reference-prototype/") + ? `reference/${sourceId.slice("reference-prototype/".length)}` + : sourceId; return id === "index" ? id : id.replace(/\/index$/, ""); } @@ -112,6 +145,13 @@ const clickhouseFields = { rss: z.any().optional(), icon: z.string().optional(), audience: z.any().optional(), + // Snapshot-rendered reference pages disclose their provenance in the layout. + generatedFromSystemTables: z.boolean().optional(), + // Identifies the generated subtree after its public route becomes `/reference`. + referenceSnapshot: z.boolean().optional(), + // Stable key used to select the matching snapshot navigation and static assets. + referenceSnapshotKey: z.string().optional(), + referenceSnapshotVersion: z.string().optional(), }; const schema = defineDocSchema({ fields: clickhouseFields, strictFrontmatter: false }); diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 000000000..287d2893a --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,9 @@ +declare namespace App { + interface Locals { + /** Original versioned route retained by the local archive rewrite. */ + archivedReference?: { + version: string; + path: string; + }; + } +} diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 21a7f8cb3..008bb46a8 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -109,14 +109,54 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); targetDocument.documentElement.dataset.inputModality = inputModality; }; + // The shortcut hint appears in the server-rendered sidebar. Work out + // its platform variant before the body is painted, rather than + // rendering one label and replacing it after hydration. + const applyShortcutPlatform = (targetDocument = document) => { + const platform = navigator.userAgentData?.platform ?? ""; + const isMac = platform + ? /mac/i.test(platform) + : /mac|iphone|ipod|ipad/i.test(navigator.userAgent); + targetDocument.documentElement.dataset.shortcutPlatform = isMac ? "mac" : "other"; + }; + const carrySidebarScroll = (targetDocument) => { const current = document.querySelector("#desktop-sidebar .ch-sidebar-scroll"); const incoming = targetDocument.querySelector("#desktop-sidebar .ch-sidebar-scroll"); if (current && incoming) { - incoming.setAttribute("data-nb-restore-scroll-top", String(current.scrollTop)); + // Clicking a link focuses it before Astro dispatches + // `astro:before-swap`; that native focus can already have moved + // the enclosing scroll rail. For a persisted reference rail, use + // the offset captured at pointer-down, before that focus happens. + const persisted = current.hasAttribute("data-astro-transition-persist") + || Boolean(current.closest("[data-astro-transition-persist]")); + const top = persisted + ? (current.getAttribute("data-nb-restore-scroll-top") ?? String(current.scrollTop)) + : String(current.scrollTop); + incoming.setAttribute("data-nb-restore-scroll-top", top); + // Astro retains the reference explorer's scroll host itself. + // Its incoming counterpart is discarded during the swap, so save + // the offset on the retained node too. This counteracts the + // browser's focus restoration, which otherwise scrolls the rail + // by one item after every clicked link. + if (persisted) { + current.setAttribute("data-nb-restore-scroll-top", top); + } } }; + const updatePersistedReferenceActiveLink = () => { + const sidebar = document.querySelector("[data-reference-sidebar-content]"); + if (!sidebar) return; + const currentPath = window.location.pathname.replace(/\/$/, ""); + sidebar.querySelectorAll("a[aria-current='page']").forEach((link) => { + link.removeAttribute("aria-current"); + }); + const match = Array.from(sidebar.querySelectorAll("a[href]")) + .find((link) => new URL(link.href, window.location.origin).pathname.replace(/\/$/, "") === currentPath); + match?.setAttribute("aria-current", "page"); + }; + const restoreSidebarScroll = () => { const sidebar = document.querySelector("#desktop-sidebar .ch-sidebar-scroll"); const raw = sidebar?.getAttribute("data-nb-restore-scroll-top"); @@ -132,6 +172,7 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); applyTheme(); applyInputModality(); + applyShortcutPlatform(); document.addEventListener( "pointerdown", () => { @@ -140,6 +181,21 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); }, true, ); + document.addEventListener( + "pointerdown", + (event) => { + const target = event.target; + if (!(target instanceof Element)) return; + const link = target.closest("#desktop-sidebar a"); + const scrollHost = link?.closest(".ch-sidebar-scroll"); + const persisted = scrollHost?.hasAttribute("data-astro-transition-persist") + || Boolean(scrollHost?.closest("[data-astro-transition-persist]")); + if (scrollHost && persisted) { + scrollHost.setAttribute("data-nb-restore-scroll-top", String(scrollHost.scrollTop)); + } + }, + true, + ); document.addEventListener( "keydown", (event) => { @@ -149,6 +205,26 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); }, true, ); + // Theme controls can appear inside a retained reference sidebar. Keep + // their behavior in this persistent pre-paint runtime instead of + // depending on a per-component hydration hook after every route swap. + document.addEventListener( + "click", + (event) => { + const target = event.target; + if (!(target instanceof Element)) return; + const button = target.closest("[data-theme-choice]"); + const choice = button?.getAttribute("data-theme-choice"); + if (choice !== "system" && choice !== "light" && choice !== "dark") return; + try { + localStorage.setItem(KEY, choice); + } catch { + // A restricted storage context can still apply the preference. + } + applyTheme(); + }, + true, + ); // ClientRouter replaces every attribute with the attributes from // the incoming server document. Stamp the saved theme onto that // detached document before the swap so no frame renders with the light @@ -156,11 +232,14 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); document.addEventListener("astro:before-swap", (event) => { applyTheme(event.newDocument); applyInputModality(event.newDocument); + applyShortcutPlatform(event.newDocument); carrySidebarScroll(event.newDocument); }); document.addEventListener("astro:after-swap", () => { applyTheme(); applyInputModality(); + applyShortcutPlatform(); + updatePersistedReferenceActiveLink(); restoreSidebarScroll(); }); media.addEventListener("change", () => { @@ -173,6 +252,17 @@ const projectLogo = inlinePublicIcon("/images/logo.svg"); window.__nbApplyTheme = applyTheme; })(); + + {/* Render the collapsed terminal tray here rather than inserting it after + JavaScript loads. This makes a hard reload paint the same bottom edge + that the terminal runtime subsequently enhances. */} + +
+
+
+ +
+ + +
+
+
diff --git a/src/layouts/DocsLayout.astro b/src/layouts/DocsLayout.astro index 6c4145df7..8419c1cc4 100644 --- a/src/layouts/DocsLayout.astro +++ b/src/layouts/DocsLayout.astro @@ -10,9 +10,11 @@ import BaseLayout from "./BaseLayout.astro"; import Header from "@/components/Header.astro"; import AskAiButton from "@/components/AskAiButton.astro"; import LocaleSwitcher from "@/components/LocaleSwitcher.astro"; +import { ThemeToggle } from "@/components/ui/theme-toggle"; import { Banner } from "@/components/ui/banner"; import { Sidebar, SidebarFilter } from "@/components/ui/sidebar"; import { SearchTrigger } from "@/components/ui/search"; +import ReferenceVersionPicker from "@/components/ReferenceVersionPicker.astro"; import { TOC, MobileTOC } from "@/components/ui/toc"; import { Pagination } from "@/components/ui/pagination"; import { PageActions } from "@/components/ui/page-actions"; @@ -38,9 +40,15 @@ type Props = Omit & { /** Language-switcher data for documentation routes. */ currentLocale?: string; activeLocales?: string[]; + /** Small provenance marker for pages whose body came from a binary snapshot. */ + generatedFromSystemTables?: boolean; + /** Keep the generated-reference explorer stable across client-side page swaps. */ + persistSidebar?: boolean; + /** Version displayed beside the snapshot reference-rail heading. */ + referenceVersion?: string; }; -const { showPageActions = true, title, description, sidebar, headings, breadcrumbs, prevNext, mode = "doc", banner, head = [], searchable, noindex, markdownUrl, socialImage, lastUpdated, editUrl, draft, audience, collection, entryId, lang, alternates, canonicalUrl, sections, currentLocale, activeLocales } = Astro.props; +const { showPageActions = true, title, description, sidebar, headings, breadcrumbs, prevNext, mode = "doc", banner, head = [], searchable, noindex, markdownUrl, socialImage, lastUpdated, editUrl, draft, audience, collection, entryId, lang, alternates, canonicalUrl, sections, currentLocale, activeLocales, generatedFromSystemTables = false, persistSidebar = false, referenceVersion } = Astro.props; // `searchable` derives from `noindex` when omitted: a non-crawlable page is // by default not in the site search either. Explicit `searchable: true` @@ -108,16 +116,24 @@ const messages = uiStrings(currentLocale); {hasSidebar ? ( ) : ( -