[fix](sql-functions) provide setup data for examples querying an undefined table#3872
Merged
morningman merged 3 commits intoJun 3, 2026
Merged
Conversation
…fined table Several SQL-function reference pages show examples of the form `SELECT ... FROM <table>` with an expected result, but never define `<table>` on the page, so the examples cannot be run or reproduced (a reader copying them gets `Table [...] does not exist`). Add the missing CREATE TABLE + INSERT for each such table, carried in a standard HTML comment (`<!-- setup-sql ... -->`) just before the first example that uses the table. As an HTML comment it does not change the rendered page, and no documented expected output is modified — it only records the data the examples already assume, making each example self-contained and reproducible. Table contents were reverse-derived from the output already printed on each page and verified end-to-end on a Doris 4.1.1 cluster: every example now resolves its table and matches the documented output cell-for-cell. Pages (EN + ZH, version-4.x): GET_FORMAT, MAKETIME, CONVERT_TO, IPV4_NUM_TO_STRING, IPV4_STRING_TO_NUM_OR_NULL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nt) docs Mirror the version-4.x change onto the dev/current copies of the same five pages (docs/ EN + i18n/.../current ZH). These files were byte-identical to the version-4.x originals, so the same `<!-- setup-sql ... -->` CREATE+INSERT applies unchanged. Verified end-to-end on a master build (doris-0.0.0, daily output): before the change every `... FROM <table>` example failed with "table does not exist"; after it, all examples resolve their table and match the documented output. Rendered page and documented expected output are unchanged (HTML comment only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sion-2.1 Extend the same fix to the three affected pages that also exist in the 3.x and 2.1 doc trees (EN + ZH): CONVERT_TO, IPV4_NUM_TO_STRING, IPV4_STRING_TO_NUM_OR_NULL. GET_FORMAT and MAKETIME do not exist in 3.x/2.1, so they are not touched. For CONVERT_TO and IPV4_STRING_TO_NUM_OR_NULL the pages are byte-identical to version-4.x, so the same `<!-- setup-sql ... -->` block applies. For IPV4_NUM_TO_STRING the 3.x/2.1 pages differ from 4.x only in frontmatter/heading, so the setup block was inserted at the same example anchor without touching the rest of the page. Verified end-to-end on the matching release clusters: version-3.x docs on a 3.1.4 cluster, version-2.1 docs on a 2.1.11 cluster. Every example now resolves its table and matches the documented output; no rendered output or expected result is modified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several SQL-function reference pages contain examples of the form
SELECT ... FROM <table>together with an expected result table, but the page never defines<table>. As written these examples cannot be run or reproduced — a reader who copies them getsTable [...] does not exist.This PR adds the missing
CREATE TABLE+INSERTfor each such table, carried in a standard HTML comment (<!-- setup-sql ... -->) placed just before the first example that uses the table. Because it is an HTML comment, the rendered page is unchanged and no documented expected output is modified — the comment only records the data the examples already assume, making each example self-contained and reproducible.The table contents were reverse-derived from the output already printed on each page (e.g.
get_format_testfrom itsSELECT *,test_maketimefrom its shownhour/minute/seccolumns) and verified end-to-end on a live cluster of the matching release for every doc tree.Pages and version coverage
current)version-4.xversion-3.xversion-2.1GET_FORMATget_format_testMAKETIMEtest_maketimeCONVERT_TOclass_testIPV4_NUM_TO_STRINGipv4_biIPV4_STRING_TO_NUM_OR_NULLipv4_strEach ✅ is updated in EN + ZH. Verification clusters: dev/current + version-4.x on a 4.1.1 build and a master daily build; version-3.x on a 3.1.4 cluster; version-2.1 on a 2.1.11 cluster. On every tree the affected examples failed with "table does not exist" before the change and pass (output matches the doc cell-for-cell) after it.
No
ja-sourcechanges.🤖 Generated with Claude Code