Skip to content

[fix](doc) SELECT.md: add student/tb_book setup for the simple examples; flag JOIN/UNION snippets as illustrative#3824

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/SELECT-md-add-missing-setup
Open

[fix](doc) SELECT.md: add student/tb_book setup for the simple examples; flag JOIN/UNION snippets as illustrative#3824
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/SELECT-md-add-missing-setup

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 27, 2026

Summary

Doc page (4.x): `sql-manual/sql-statements/data-query/SELECT.md` (EN + ZH).

The Examples section calls out roughly 15 different tables (`student`, `tb_book`, `t1`-`t4`, `employee`, `info`, `left_tbl`, `right_tbl`, `tournament`, `test_table`, `users`, `student_01`/`student_02`), none of which the page creates. Adding setup for all 15 would balloon the doc and is not really the page's intent — most of the multi-table examples (UNION / WITH / JOIN / TABLESAMPLE) are illustrative of the syntax shape rather than meant to run end-to-end.

This PR adds a single small setup block at the top of `## Example` that creates the two tables shared by the simplest 9 examples — `student` (5 rows) and `tb_book` (5 rows). After this change, examples 1-9 (IN-list filter, ALL EXCEPT, GROUP BY, DISTINCT, ORDER BY, LIMIT, CONCAT, SUM aggregation, expression aliases) all run end-to-end on Apache Doris 4.1.1.

A one-line note above the setup explains that the later JOIN / UNION / WITH / TABLESAMPLE examples reference tables not created on the page and are illustrative.

Verification

Each of examples 1-9 runs against the new setup on a single-node Apache Doris 4.1.1 cluster.

Test plan

  • Examples 1-9 produce results consistent with the documented intent.
  • EN and ZH updated in parallel.
  • No existing example removed or relabeled.

🤖 Generated with Claude Code

…s actually run

The Examples section of the SELECT statement reference page calls
out roughly 15 different tables (`student`, `tb_book`, `t1`, `t2`,
`t3`, `t4`, `employee`, `info`, `left_tbl`, `right_tbl`,
`tournament`, `test_table`, `users`, `student_01`, `student_02`),
none of which the page creates. Adding setup for all 15 would
balloon the doc and is not really the page's intent — most of the
multi-table examples (UNION / WITH / JOIN / TABLESAMPLE) are
illustrative of the syntax shape rather than meant to be run
end-to-end.

This change adds a single small setup block at the top of the
Examples section that creates the two tables shared by the simplest
9 examples — `student` (5 rows) and `tb_book` (5 rows). After this
change, examples 1-9 (IN-list filter, ALL EXCEPT, GROUP BY,
DISTINCT, ORDER BY, LIMIT, CONCAT, SUM aggregation, expression
aliases) all run end-to-end on Apache Doris 4.1.1 and produce the
documented behavior.

A one-line note above the setup explains that the later JOIN /
UNION / WITH / TABLESAMPLE examples reference tables not created
on the page and are illustrative.

EN and ZH both updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant