Repository navigation
CI: autogenerate SQL statement documentation - #115609
Conversation
|
Workflow [PR], commit [ebd0260] Summary: ✅ AI ReviewSummaryThis PR moves SQL statement page generation onto Findings
Final VerdictStatus: Minimum required actions:
|
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units8 translation units recompiled, 16 s compile time in total, 8 of them have a recent master baseline. |
# Conflicts: # ci/jobs/docs_autogen_nightly.py # ci/jobs/scripts/docs/autogenerate/autogenerate_docs.py # ci/jobs/scripts/docs/autogenerate/test_no_remap_guard.py
# Conflicts: # ci/jobs/docs_autogen_nightly.py
Use the normal `system.documentation` renderer so structured fields such as `syntax` remain part of short statement documents. Related: ClickHouse#115609 (comment)
Enumerate all statements through `system.statements`, read rendered Markdown from `system.documentation`, and match it strictly to marked page titles. Related: ClickHouse#115609 (comment) Related: ClickHouse#115609 (comment)
Regenerate statement pages from `system.documentation` using the branch-built binary, exposing the structured syntax, parent, and related sections. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115609&sha=3771b440e23d4d6fd1e2dc63a69442d2736fd514&name_0=PR&name_1=Fast%20test PR: ClickHouse#115609
Keep the existing positional schema of `system.statements` stable by adding `title` after all established columns. Pin the column order in the stateless test. Review: ClickHouse#115609 (comment) PR: ClickHouse#115609
Fail closed when an autogenerated statement page has missing or invalid frontmatter `title` metadata, and cover that routing-contract error in the focused generator test. Review: ClickHouse#115609 (comment) PR: ClickHouse#115609
Use one Mintlify output pipeline and normalize source-formatted Markdown unconditionally. Remove the `--no-remap-legacy` option, its guard test, and compatibility with legacy HTML region markers. Related: ClickHouse#115609
Make each marked page title match its unique `registerStatement` name. Remove the redundant `Documentation::title` field, `.title` registrations, and the unmerged `system.statements.title` column, then route generator output directly by name. Related: ClickHouse#115609
Do not append a structured `Syntax` block in `system.documentation` when the source description already contains the same syntax. Regenerate the eight affected statement pages and add a functional regression check. Related: ClickHouse#115609
The `arm_tidy` build requires the container membership API instead of comparing `String::find` with `String::npos`. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115609&sha=6dcda442bca9440f170b0732e2f9bc8984abd13f&name_0=PR&name_1=Build%20%28arm_tidy%29 Related: ClickHouse#115609
Recognize explicit Markdown syntax labels and prose which directly introduces an SQL syntax block. This avoids appending structured syntax when punctuation or formatting differs from the source-owned section. Regenerate the statement pages and cover the non-verbatim cases in the `system.documentation` stateless test. Related: ClickHouse#115609
| return equalsCaseInsensitive(line, "related") | ||
| || equalsCaseInsensitive(line, "related content") | ||
| || equalsCaseInsensitive(line, "related statements") | ||
| || equalsCaseInsensitive(line, "see also"); |
There was a problem hiding this comment.
descriptionDocumentsRelated is currently treating any Related content / See Also heading as if the source page already owns the statement cross-reference block. That drops structured related links on pages where those manual sections point somewhere else.
UNION is a concrete repro: ParserSelectWithUnionQuery.cpp defines .related = {"SELECT", "INTERSECT", "EXCEPT", "DISTINCT", "JOIN"}, but the source description's **See Also** block only links insert_null_as_default and union_default_mode. With this heuristic, system.documentation and the regenerated docs/reference/statements/select/union.mdx lose all of those statement links. The same pattern also hits other statements that only have blog/settings See Also or Related content sections.
Can we narrow this suppression to true statement-related sections (Related, Related statements, etc.), or merge the structured statement links into generic See Also / Related content blocks instead of dropping them? The new 05043_statement_documentation_related_sections.sql check currently pins the weaker behavior by expecting UNION to stay at zero **Related:** blocks.
4b2ab48
Register `CREATE HANDLER` in `StatementFactory`, keep the full reference body in the parser registration, and mark the Mintlify page as generated through `system.documentation`. Related: ClickHouse#115609 Related: ClickHouse#106231
Extends the nightly documentation autogeneration job to regenerate every marked SQL statement page from source-owned documentation.
The generator enumerates every registered statement in one query, reads the complete rendered Markdown from
system.documentation, and matches its unique registry name one-to-one with the corresponding Mintlify frontmatter title. All marked statement pages use that canonical registered name as their title. Missing pages, missing markers, duplicate names, stale marked pages, and empty rendered documents all fail closed.This removes the checked-in page-to-statement manifest as well as presentation-only title metadata from the server source. A newly registered statement is automatically included in the generated inventory; its registry name and marked page form the routing contract. Using
system.documentationalso preserves structured sections such assyntaxandrelatedwhen they are not already part of the source-owned description.The nightly generator has one supported output path: the current Mintlify documentation. It always resolves generated destinations through the current route map and normalizes source-formatted Markdown before writing. The legacy
--no-remap-legacymode and HTML region-marker compatibility have been removed.The generator was run and all 99 statement pages pass the drift check. Structured
Syntax,Part of, andRelatedsections are rendered when absent, while syntax already embedded in a source description is not appended a second time; this removes duplicate syntax blocks from 16 pages. The output also normalizes the 74 page titles that previously differed from their registered statement names; the other 25 titles already matched.Builds on the source migration merged in #115608.
Related: #115341
Related: #115608
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Workflow [PR]
Sync PR [sync-upstream/pr/115609]
Version info
26.9.1.107(included in26.9and later)