[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
Open
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code