boluor opened a new pull request, #3789:
URL: https://github.com/apache/doris-website/pull/3789

   ## 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.
   
   1. Same missing-setup issue as EN.
   2. Internal inconsistency: the basic ASC and DESC result tables show 6 rows 
(no NULL), but the NULLS FIRST result table shows 7 rows with a NULL. A single 
dataset cannot produce both. The prose immediately above the examples 
explicitly explains *\"对于 NULL 值,可以使用 nulls first 或 nulls last 控制排序顺序\"*, 
confirming the author intends a dataset that contains NULL — so the basic ASC / 
DESC results, not the NULLS FIRST one, are the ones that are wrong.
   
   The ZH fix:
   - Setup includes 7 rows (Suzi×2, Ben×2, Henry×2, NULL).
   - Basic ASC result: 7 rows, NULL first (\`FIELD\` returns 0 for values not 
in the list including NULL; Doris's default ASC puts NULLs first).
   - DESC result: 7 rows, NULL last.
   - NULLS FIRST result: unchanged (already correct).
   
   ## 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
   
   - [x] Run EN setup + all 3 EN examples → matches each documented result.
   - [x] Run ZH setup + all 4 ZH examples → matches each documented result.
   - [x] No prose changes; only example reproducibility/correctness.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to