doc bug: EXPORT_SET example output table has 6 columns but the SQL selects only 1

Open Beginner friendly
#3,879 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
sql

Research direction

Open sql-manual/sql-functions/scalar-functions/string-functions/export-set.md and locate the example whose output table has six columns. Compare the displayed query with the table, then check the corresponding EN and ZH pages in version-4.x and dev/current. Done means the query and output agree in all four documented copies.

Written by the indexing model from the issue text.

Description

On the EXPORT_SET page (sql-manual/sql-functions/scalar-functions/string-functions/export-set.md, present in version-4.x and the dev/current docs), one example does not match its own output:

SELECT EXPORT_SET(`bits`, `on`, `off`, `sep`, `num_of_b`)
FROM `test_export_set`;

The SQL selects a single column (the EXPORT_SET(...) result), but the documented output table shows six columns: bits | on | off | sep | num_of_b | ans. So the displayed output cannot be produced by the shown query — running the query as written returns only the ans column.

The output table clearly intends to show the input columns alongside the result (the last column is even aliased ans). Suggested fix — align the SQL with the shown output:

SELECT `bits`, `on`, `off`, `sep`, `num_of_b`,
       EXPORT_SET(`bits`, `on`, `off`, `sep`, `num_of_b`) AS ans
FROM `test_export_set`;

(EN + ZH, both version-4.x and dev/current.) Filing separately from the setup-data change for this page so the SQL/output correction can be reviewed on its own.

Dominant language
MDX
Stars
134
Forks
466
Avg merge
1d 11h
Merged PRs (30d)
54

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/doris-website

All issues in apache/doris-website

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.