[fix](doc) field.md: add missing setup; reconcile zh result tables with NULL row#3789
Open
boluor wants to merge 2 commits into
Open
[fix](doc) field.md: add missing setup; reconcile zh result tables with NULL row#3789boluor wants to merge 2 commits into
boluor wants to merge 2 commits into
Conversation
…_test The two table-based examples reference baseall and class_test but the page never defined them, so copy-paste/`source` of the snippets fails. Add a setup block that creates both tables and inserts the rows shown in the existing expected results (Suzi/Ben/Henry without NULL). Verified on a single-node Apache Doris 4.1.1 cluster: with this setup all three EN examples reproduce the documented output exactly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ith NULL row Two problems on the ZH page: 1. baseall and class_test were referenced without being defined. 2. The basic ASC and DESC result tables showed 6 rows (no NULL), but the NULLS FIRST example showed 7 rows with a NULL — which is only reproducible against a single dataset if NULL is actually present. The prose right above the examples explicitly tells the reader to use `nulls first`/`nulls last` to control NULL ordering, confirming the author's intent is a dataset that includes NULL. This change: - Adds a setup block creating both tables and inserting the rows shown in the existing NULLS FIRST result (Suzi/Ben/Henry plus one NULL). - Updates the basic ASC result to put NULL first (FIELD returns 0 for values not in the list, including NULL; Doris's default ASC orders NULLs first). - Updates the DESC result to put NULL last. - Leaves the NULLS FIRST example untouched — it already matched reality. Verified on a single-node Apache Doris 4.1.1 cluster. 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 pages (4.x): `scalar-functions/other-functions/field.md` (EN + ZH).
EN: The two table-based examples reference `baseall` and `class_test` but the page never created/inserted into them — copy-paste fails. Added a setup block that materializes both tables with the rows shown in the existing expected results (Suzi/Ben/Henry, no NULL).
ZH: Two problems.
The ZH fix:
Verification
Ran the setup + every example end-to-end on a single-node Apache Doris 4.1.1 cluster. Every documented result block in this PR now matches the cluster output exactly.
Split into 2 commits so the EN-only and ZH-only changes are easy to review separately.
Test plan
🤖 Generated with Claude Code