boluor opened a new pull request, #3812:
URL: https://github.com/apache/doris-website/pull/3812
## Summary
Doc page (4.x): \`scalar-functions/date-time-functions/milliseconds-sub.md\`
(EN).
The \"calculation result exceeds the datetime range\" example claimed:
\`\`\`sql
SELECT MILLISECONDS_SUB('0000-01-01', -1500);
ERROR 1105 (HY000): ... -1500 out of range
\`\`\`
But \`MILLISECONDS_SUB(date, -1500)\` is equivalent to
\`MILLISECONDS_ADD(date, 1500)\` and produces a valid \`0000-01-01
00:00:01.500000\` — not an error. The doc had the sign of the delta backwards.
The ZH counterpart already uses \`+1500\`, which correctly underflows below
0000-01-01.
Also flip the error string's function name from \`milliseconds_add\` to
\`millisecond_add\` (singular form), which is what 4.x actually prints in the
underlying error.
## Verification
\`\`\`
mysql> SELECT MILLISECONDS_SUB('0000-01-01', -1500);
+---------------------------------------+
| MILLISECONDS_SUB('0000-01-01', -1500) |
+---------------------------------------+
| 0000-01-01 00:00:01.500000 |
+---------------------------------------+
mysql> SELECT MILLISECONDS_SUB('0000-01-01', 1500);
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[E-218]Operation
millisecond_add of 0000-01-01 00:00:00, -1500 out of range
\`\`\`
## Test plan
- [x] Run both forms on a 4.1.1 cluster — only the +1500 form raises the
documented error.
- [x] No other change.
🤖 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]