Skip to content

[fix](doc) v3.x: replace stray ${tableName_21} placeholder in quantile docs#3852

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix/quantile-docs-stray-tablename-placeholder
May 30, 2026
Merged

[fix](doc) v3.x: replace stray ${tableName_21} placeholder in quantile docs#3852
morningman merged 1 commit into
apache:masterfrom
boluor:fix/quantile-docs-stray-tablename-placeholder

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 29, 2026

Problem

The CREATE TABLE example in two v3.x quantile-function pages carries an unsubstituted doc-template variable ${tableName_21}, while the INSERT/SELECT statements that follow all reference the literal table quantile_state_agg_test. On a real cluster the CREATE builds a table literally named ${tableName_21}, so every subsequent statement fails:

errCode = 2, detailMessage = Table [quantile_state_agg_test] does not exist in database [...]

Each page is broken in only one language; the other language was already correct:

File Lang
versioned_docs/version-3.x/sql-manual/sql-functions/scalar-functions/quantile-functions/quantile-percent.md EN
i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/quantile-functions/to-quantile-state.md ZH

Fix

Use the literal name quantile_state_agg_test in the CREATE TABLE so it matches the INSERT/SELECT that follow.

Cluster verification (Doris 3.1.4-rc02, fresh single-node cluster)

SELECT dt, id, quantile_percent(quantile_union(price), 0)
  FROM quantile_state_agg_test GROUP BY dt, id ORDER BY dt, id;
+----------+------+--------------------------------------------+
| dt       | id   | quantile_percent(quantile_union(price), 0) |
+----------+------+--------------------------------------------+
| 20220201 |    0 |                                          1 |
| 20220201 |    1 |                                         -1 |
+----------+------+--------------------------------------------+

Matches the documented expected output.

🤖 Generated with Claude Code

…e docs

The CREATE TABLE example in two quantile-function pages still carries an
unsubstituted doc-template variable `${tableName_21}`, while the following
INSERT/SELECT statements all reference the literal table
`quantile_state_agg_test`. On a real cluster the CREATE makes a table named
`${tableName_21}`, so every subsequent statement fails with
"Table [quantile_state_agg_test] does not exist".

Affected (each broken in one language only; the other language was already
correct):
  - EN versioned_docs/version-3.x/.../quantile-functions/quantile-percent.md
  - ZH i18n/zh-CN/.../version-3.x/.../quantile-functions/to-quantile-state.md

Fix: use the literal name `quantile_state_agg_test` in the CREATE TABLE so it
matches the INSERT/SELECT that follow.

Cluster verification (Doris 3.1.4-rc02, fresh single-node cluster):

    CREATE TABLE IF NOT EXISTS quantile_state_agg_test ( ... );   -- OK
    INSERT INTO quantile_state_agg_test VALUES(20220201,0, to_quantile_state(1, 2048));   -- OK
    INSERT INTO quantile_state_agg_test VALUES(20220201,1, ...);  -- OK
    SELECT dt, id, quantile_percent(quantile_union(price), 0)
      FROM quantile_state_agg_test GROUP BY dt, id ORDER BY dt, id;
    +----------+------+--------------------------------------------+
    | dt       | id   | quantile_percent(quantile_union(price), 0) |
    +----------+------+--------------------------------------------+
    | 20220201 |    0 |                                          1 |
    | 20220201 |    1 |                                         -1 |
    +----------+------+--------------------------------------------+

Matches the documented expected output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman morningman merged commit 46d4b87 into apache:master May 30, 2026
3 checks passed
morningman pushed a commit that referenced this pull request May 30, 2026
…tile-state (#3856)

Backport of #3852 to `version-2.1`.

## Problem

The ZH `to-quantile-state.md` CREATE TABLE example carries the
unsubstituted doc-template variable `${tableName_21}`, while the
INSERT/SELECT that follow reference the literal
`quantile_state_agg_test`. On a real cluster the CREATE makes a table
literally named `${tableName_21}`, so every later statement fails with
table-not-found.

## Fix

Use the literal name `quantile_state_agg_test` in the CREATE TABLE.

## Cluster verification (Doris 2.1.11-rc01, fresh single-node cluster)

```
SELECT dt, id, quantile_percent(quantile_union(price), 0)
  FROM quantile_state_agg_test GROUP BY dt, id ORDER BY dt, id;
+----------+------+--------------------------------------------+
| dt       | id   | quantile_percent(quantile_union(price), 0) |
+----------+------+--------------------------------------------+
| 20220201 |    0 |                                          1 |
| 20220201 |    1 |                                         -1 |
+----------+------+--------------------------------------------+
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@boluor boluor deleted the fix/quantile-docs-stray-tablename-placeholder branch May 30, 2026 08:25
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