[fix](doc) zh: unix-timestamp missing semicolon; DESC-TABLE wrong db qualifier and stale IndexKeysType#3831
Merged
morningman merged 1 commit intoMay 30, 2026
Conversation
…lon, DESC-TABLE wrong db qualifier + stale IndexKeysType)
unix-timestamp.md (zh):
`select unix_timestamp('1007-11-30 10:30:19')` was missing a trailing
semicolon. Without it the extractor concatenates the result-table ASCII
art onto the SQL and feeds the whole thing to the cluster, which trips
on `|` with "extraneous input". EN has the semicolon. Added it back.
DESC-TABLE.md (zh):
Example 2 was `DESC demo.test_table ALL;`, but neither this page nor
its prior `CREATE TABLE` ever creates a `demo` database. The qualifier
was a leftover stand-in; the example teaches the `ALL` option, not the
`<db_name>.` syntax (which is already documented in the Syntax block
on line 16). Dropped the `demo.` qualifier to match the previous
example's unqualified form.
Also fixed the example-2 expected output: `IndexKeysType` was shown as
`DUP_KEYS` but the same page's `CREATE TABLE` uses `UNIQUE KEY(user_id)`,
so the actual value is `UNIQUE_KEYS`. Verified end-to-end on a fresh
Doris 4.1.1 cluster.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
morningman
pushed a commit
that referenced
this pull request
May 30, 2026
…n, DESC ALL) (#3832) ## Summary The ZH page for `DESC-TABLE` documents two examples that the EN page is missing: 1. **`SET show_column_comment_in_describe = true` + `DESC test_table`** — surfaces the `Comment` column. The session variable was introduced in 3.0.7 and is already described in the EN Return-Value section (line 59), but the EN page never exemplifies it. 2. **`DESC test_table ALL`** — returns the schema across all indexes, including `IndexName`, `IndexKeysType`, `InternalType`, `Visible`, `DefineExpr`, `WhereClause`. Translated both blocks to English and added them under the existing example 1. The expected outputs were captured directly from a fresh Doris 4.1.1 cluster against the page's `CREATE TABLE` schema, so `IndexKeysType = UNIQUE_KEYS` to match `UNIQUE KEY(user_id)` (avoiding a stale `DUP_KEYS` value). ## Verification ``` mysql> SET show_column_comment_in_describe=true; mysql> DESC test_table; +---------+-------------+------+-------+---------+-------+----------+ | Field | Type | Null | Key | Default | Extra | Comment | +---------+-------------+------+-------+---------+-------+----------+ | user_id | bigint | No | true | NULL | | Key1 | | name | varchar(20) | Yes | false | NULL | NONE | username | | age | int | Yes | false | NULL | NONE | user_age | +---------+-------------+------+-------+---------+-------+----------+ mysql> DESC test_table ALL; +------------+---------------+---------+-------------+--------------+------+-------+---------+-------+---------+------------+-------------+ | IndexName | IndexKeysType | Field | Type | InternalType | Null | Key | Default | Extra | Visible | DefineExpr | WhereClause | +------------+---------------+---------+-------------+--------------+------+-------+---------+-------+---------+------------+-------------+ | test_table | UNIQUE_KEYS | user_id | bigint | bigint | No | true | NULL | | true | | | | | | name | varchar(20) | varchar(20) | Yes | false | NULL | NONE | true | | | | | | age | int | int | Yes | false | NULL | NONE | true | | | +------------+---------------+---------+-------------+--------------+------+-------+---------+-------+---------+------------+-------------+ ``` ## Related - PR #3831 fixes the corresponding zh-side issues (`demo.` qualifier, stale `DUP_KEYS`) on the same examples. This PR adds the EN equivalents so the two language versions stay in sync. ## Test plan - [x] Verified the EN expected output exactly matches Doris 4.1.1 cluster output - [x] `IndexKeysType` matches the schema's UNIQUE KEY (no copy-paste stale value) - [x] Page renders correctly (no fence/markdown issues) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
morningman
pushed a commit
that referenced
this pull request
May 30, 2026
…EN DESC-TABLE example expansion (#3847) ## Summary Mechanical port of the 4.x fixes in #3830, #3831, #3832, #3834, #3835, #3836 to dev/master. Every change here was verified to still be needed on today's master build (cluster deployed from selectdb-qa-test tarball, 5.14 GB). Three 4.x fixes turned out to be already-applied on dev and are **not** included in this PR (skipping): - log10 ZH (NULL/NaN examples already in dev) - strleft ZH (example 9 already removed in dev) - milliseconds-add EN (BIGINT-range example already in dev) ## Files (15) ### ZH (`i18n/zh-CN/.../current/`) - **arrays-overlap.md** — remove two stray `'` after closing fences - **unix-timestamp.md** — add missing semicolon after `select unix_timestamp('1007-11-30 10:30:19')` - **DESC-TABLE.md** — drop `demo.` qualifier (`DESC demo.test_table ALL` → `DESC test_table ALL`); fix stale `DUP_KEYS` cell → `UNIQUE_KEYS` (matches the page's own `UNIQUE KEY(user_id)` setup) - **week.md** — drop the ` ```sql ` wrapper around the Mode definition markdown table - **milliseconds-add.md** — remove 5 copy-paste duplicate examples; fix BIGINT-range example expected output (\"returns NULL\" → actual `2023-10-03 12:33:32.083000`) - **9 array / bitmap / aggregate / string files** — fence-flavor parity (` ``` ` or ` ```text ` → ` ```sql ` where the block contains runnable SQL). `trim-in.md` additionally adds example 3 (TRIM comparison) that was missing. ### EN (`docs/`) - **DESC-TABLE.md** — add a CREATE TABLE setup block, backport the two ZH-only examples (Comment column via `show_column_comment_in_describe`, and `DESC ... ALL`). The Comment-column behavior was already mentioned in the Return-Value section but never exemplified. ## Verification Verified end-to-end against today's master cluster — every added example runs cleanly, behaviors documented are the same on master as on 4.1.1 (no master-side regression on log10/MINUTE/SPLIT_PART/UNHEX/count_by_enum either). ## Related 4.x PRs #3830 #3831 #3832 #3834 #3835 #3836 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (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.
Summary
Two ZH-only single-line doc bugs surfaced by the doc verifier on Doris 4.1.1:
unix-timestamp.md(zh)select unix_timestamp('1007-11-30 10:30:19')was missing the trailing semicolon. The whole 举例 section is one giant\``sqlblock where statements are separated by;; without the semicolon the result-table ASCII art (+---+ | … | +---+) gets concatenated onto the SQL and sent to the cluster, which trips on|` ("extraneous input"). The EN version has the semicolon.DESC-TABLE.md(zh)Two issues in example 2:
DESC demo.test_table ALL;, but neither this page nor its priorCREATE TABLEever creates ademodatabase. Thedemo.qualifier was a leftover stand-in and contradicts the previous example (DESC test_table;). The<db_name>.<table_name>syntax is already documented in the Syntax block on line 16, so dropping the qualifier doesn't lose pedagogical value.IndexKeysType = DUP_KEYS, but the same page'sCREATE TABLEusesUNIQUE KEY(user_id), so the real value isUNIQUE_KEYS. TheDUP_KEYSrow was stale from when the example may have used aDUPLICATE KEYtable.Verification
Verified both flows end-to-end on a fresh Doris 4.1.1 single-node cluster:
Test plan
select unix_timestamp('1007-11-30 10:30:19');returns 0 on Doris 4.1.1DESC test_table ALL;on the schema defined earlier in the page returns the corrected table contents🤖 Generated with Claude Code