Skip to content

[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
apache:masterfrom
boluor:fix/hours-diff-zh-missing-semicolon
Open

[fix](doc) hours-diff.md zh: add missing semicolon and top divider on negative-difference example#3801
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/hours-diff-zh-missing-semicolon

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 26, 2026

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

  • Run the corrected SQL on a 4.1.1 cluster — returns `-1` as documented.
  • No other change.

🤖 Generated with Claude Code

…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>
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