[fix](doc) hours-diff.md zh: add missing semicolon and top divider on negative-difference example#3801
Open
boluor wants to merge 1 commit into
Open
Conversation
…ivider The second example on the ZH page is missing the trailing semicolon on the SELECT and the opening +---+ divider above the result-row header. Without the semicolon, the SQL block runs together with the ASCII grid that follows and the parser chokes on the bare `|` lines. EN already has the semicolon and the matching divider in the same spot. 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): `scalar-functions/date-time-functions/hours-diff.md` (ZH).
The second example on the ZH page is missing two small things:
```
---结束时间早于开始时间,返回负数
select hours_diff('2020-12-25 20:00:00', '2020-12-25 21:00:00') ← no `;`
| hours_diff('2020-12-25 20:00:00', '2020-12-25 21:00:00') | ← no opening `+---+` divider
+----------------------------------------------------------+
| -1 |
+----------------------------------------------------------+
```
Without the semicolon the SELECT runs together with the ASCII grid that follows and the parser chokes on the bare `|` lines. EN has both the semicolon and the matching opening divider in the same spot.
Verification
After the fix the example parses and runs cleanly on Apache Doris 4.1.1 and returns the documented `-1`.
Test plan
🤖 Generated with Claude Code