Skip to content

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

@boluor

Description

@boluor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions