Skip to content

[fix](doc) dev: un-glue SET lc_time_names from comment line in MONTHNAME example#3863

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix/monthname-set-lc-time-names-dev
Jun 2, 2026
Merged

[fix](doc) dev: un-glue SET lc_time_names from comment line in MONTHNAME example#3863
morningman merged 1 commit into
apache:masterfrom
boluor:fix/monthname-set-lc-time-names-dev

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 30, 2026

The EN dev monthname.md localization example put the explanatory comment and the SET statement on a single -- comment line:

---Control the output language by setting `lc_time_names`SET lc_time_names='zh_CN';
SELECT MONTHNAME('2023-07-13 22:28:18') AS result;
+--------+
| result |
+--------+
| 七月   |
+--------+

Because the entire line is a SQL line-comment, SET lc_time_names='zh_CN'; is commented out. A reader copy-pasting the block runs the SELECT in the default en_US session and gets July, not the documented 七月 — so the localization example is inert and misleading.

Fix: move SET onto its own line (matching the -- comment style used by the other comments in the same block). The documented output values are all correct; only the formatting was broken.

-- Control the output language by setting `lc_time_names`
SET lc_time_names='zh_CN';
SELECT MONTHNAME('2023-07-13 22:28:18') AS result;

Scope: dev EN only. The ZH page (i18n/zh-CN/.../current/.../monthname.md) and the v4.x EN page already have SET on its own line, so they are unaffected — no backport needed.

Verification — run end-to-end on a live master daily build (doris-0.0.0-2e72603618c):

SELECT MONTHNAME('2023-07-13 22:28:18');     -> July
SET lc_time_names='zh_CN';
SELECT MONTHNAME('2023-07-13 22:28:18');     -> 七月
SET lc_time_names='AR_sa';
SELECT MONTHNAME('2023-07-13 22:28:18');     -> يوليو

All three outputs match the documented expected values.

🤖 Generated with Claude Code

…AME example

The EN dev `monthname.md` localization example had the explanatory comment and
the SET statement on a single `--` comment line:

    ---Control the output language by setting `lc_time_names`SET lc_time_names='zh_CN';
    SELECT MONTHNAME('2023-07-13 22:28:18') AS result;
    | 七月 |

Because the whole line is a SQL line-comment, `SET lc_time_names='zh_CN';` is
commented out. A reader copy-pasting the block runs the SELECT in the default
`en_US` session and gets `July`, not the documented `七月` — the localization
example is inert/misleading. Fix: put SET on its own line (matching the `-- `
comment style used elsewhere in the same block).

The documented output values are all correct; only the formatting was broken.
The ZH page (`i18n/.../current/.../monthname.md`) and the v4.x EN page already
have SET on its own line and are unaffected, so this is a dev-EN-only fix.

Verified end-to-end on a live master daily build (doris-0.0.0-2e72603618c):

    SELECT MONTHNAME('2023-07-13 22:28:18');           -> July
    SET lc_time_names='zh_CN';
    SELECT MONTHNAME('2023-07-13 22:28:18');           -> 七月
    SET lc_time_names='AR_sa';
    SELECT MONTHNAME('2023-07-13 22:28:18');           -> يوليو

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman morningman merged commit f3129b9 into apache:master Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants