apache / apache/doris-website

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

Open
#3,879 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
133
Forks
464
Avg merge
1d 1h
Merged PRs (30d)
50

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:

```sql
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:

```sql
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.