This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new f5d8ef27f9e [feat](func) Support CURTIME with precision (#2935)
f5d8ef27f9e is described below
commit f5d8ef27f9ef9cacab03b6a15830109fc9d1f9fe
Author: linrrarity <[email protected]>
AuthorDate: Fri Oct 10 14:02:51 2025 +0800
[feat](func) Support CURTIME with precision (#2935)
## Versions
- [x] dev
- [ ] 3.0
- [ ] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../date-time-functions/curtime.md | 31 ++++++++++++++++++++-
.../date-time-functions/curtime.md | 32 +++++++++++++++++++++-
2 files changed, 61 insertions(+), 2 deletions(-)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
index c3e4a67a6aa..455ac5e25d0 100644
---
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
+++
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
@@ -18,9 +18,15 @@ This function is consistent with the [curtime
function](https://dev.mysql.com/do
## Syntax
```sql
-CURTIME()
+CURTIME([<precision>])
```
+## Parameters
+
+| Parameter | Description
|
+|---------------|----------------------------------------------------------------------------------------------------------------------------------------------|
+| `<precision>` | Optional parameter indicating the precision of the
fractional seconds part of the return value, must be a constant value ranging
from 0 to 6. Default is 0, which means no fractional seconds part is returned. |
+
## Return Value
Returns the current time type of TIME.
@@ -35,4 +41,27 @@ mysql> select curtime();
+----------------+
| 15:25:47 |
+----------------+
+```
+
+```sql
+mysql> select curtime(0);
++------------+
+| curtime(0) |
++------------+
+| 13:15:27 |
++------------+
+```
+
+```sql
+mysql> select curtime(4);
++---------------+
+| curtime(4) |
++---------------+
+| 15:31:03.8958 |
++---------------+
+```
+
+```sql
+mysql> select curtime(7);
+ERROR 1105 (HY000): errCode = 2, detailMessage = The precision must be between
0 and 6
```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
index a3e6a702ba1..e762a4477bb 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/curtime.md
@@ -16,9 +16,16 @@
## 语法
```sql
-CURTIME()
+CURTIME([<precision>])
```
+## 参数
+
+| 参数 | 说明
|
+|---------------|-------------------------------------------------------------------------------------------------------------------------------------|
+| `<precision>` | 可选参数,表示返回值的小数秒部分的精度,该参数需为 0 到 6 的常量值。默认为 0,即不返回小数秒部分。 |
+
+
## 返回值
返回当前时间,类型为 TIME。
@@ -32,4 +39,27 @@ mysql> select curtime();
+----------------+
| 15:25:47 |
+----------------+
+```
+
+```sql
+mysql> select curtime(0);
++------------+
+| curtime(0) |
++------------+
+| 13:15:27 |
++------------+
+```
+
+```sql
+mysql> select curtime(4);
++---------------+
+| curtime(4) |
++---------------+
+| 15:31:03.8958 |
++---------------+
+```
+
+```sql
+mysql> select curtime(7);
+ERROR 1105 (HY000): errCode = 2, detailMessage = The precision must be between
0 and 6
```
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]