This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 65eb667724b add cot/sec/cosec (#2604)
65eb667724b is described below
commit 65eb667724b7b92e5fdec3fe4ef7a916ddae7c72
Author: Pxl <[email protected]>
AuthorDate: Wed Jul 30 10:01:28 2025 +0800
add cot/sec/cosec (#2604)
## Versions
- [x] dev
- [ ] 3.0
- [ ] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../scalar-functions/numeric-functions/cot.md | 54 +++++++++++++++++++++
.../scalar-functions/numeric-functions/csc.md | 54 +++++++++++++++++++++
.../scalar-functions/numeric-functions/sec.md | 54 +++++++++++++++++++++
.../scalar-functions/numeric-functions/cot.md | 55 ++++++++++++++++++++++
.../scalar-functions/numeric-functions/csc.md | 54 +++++++++++++++++++++
.../scalar-functions/numeric-functions/sec.md | 54 +++++++++++++++++++++
sidebars.json | 4 ++
7 files changed, 329 insertions(+)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
new file mode 100644
index 00000000000..b1c7dcf8005
--- /dev/null
+++ b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
@@ -0,0 +1,54 @@
+---
+{
+ "title": "COT",
+ "language": "en"
+}
+---
+
+## Description
+
+Returns the cotangent of x, where x is the value in radians, only input and
output are supported as double. Input null value will return null value.
+
+## Syntax
+
+```sql
+COT(<x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<x>` | The value for which the cotangent is to be calculated |
+
+## Return Value
+
+Returns a Double type value means the cotangent of x.
+
+## Example
+
+```sql
+select cot(1),cot(2),cot(1000);
+```
+
+```text
++--------------------+----------------------+--------------------+
+| cot(1) | cot(2) | cot(1000) |
++--------------------+----------------------+--------------------+
+| 0.6420926159343306 | -0.45765755436028577 | 0.6801221323348698 |
++--------------------+----------------------+--------------------+
+```
+
+Input null value.
+
+```sql
+select cot(null);
+```
+
+```text
++--------------------+
+| cot(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
new file mode 100644
index 00000000000..d160fdbbf0a
--- /dev/null
+++ b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
@@ -0,0 +1,54 @@
+---
+{
+ "title": "CSC",
+ "language": "en"
+}
+---
+
+## Description
+
+Returns the cosecant of x, where x is the value in radians, only input and
output are supported as double. Input null value will return null value.
+
+## Syntax
+
+```sql
+CSC(<x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<x>` | The value for which the cosecant is to be calculated |
+
+## Return Value
+
+Returns a Double type value means the cosecant of x.
+
+## Example
+
+```sql
+select csc(1),csc(2),csc(1000);
+```
+
+```text
++--------------------+--------------------+------------------+
+| csc(1) | csc(2) | csc(1000) |
++--------------------+--------------------+------------------+
+| 1.1883951057781212 | 1.0997501702946164 | 1.20936599707935 |
++--------------------+--------------------+------------------+
+```
+
+Input null value.
+
+```sql
+select csc(null);
+```
+
+```text
++--------------------+
+| csc(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
new file mode 100644
index 00000000000..2e033f91ffb
--- /dev/null
+++ b/docs/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
@@ -0,0 +1,54 @@
+---
+{
+ "title": "SEC",
+ "language": "en"
+}
+---
+
+## Description
+
+Returns the secant of x, where x is the value in radians, only input and
output are supported as double. Input null value will return null value.
+
+## Syntax
+
+```sql
+SEC(<x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<x>` | The value for which the secant is to be calculated |
+
+## Return Value
+
+Returns a Double type value means the secant of x.
+
+## Example
+
+```sql
+select sec(1),sec(2),sec(1000);
+```
+
+```text
++--------------------+--------------------+--------------------+
+| sec(1) | sec(2) | sec(1000) |
++--------------------+--------------------+--------------------+
+| 1.8508157176809255 | -2.402997961722381 | 1.7781600385912715 |
++--------------------+--------------------+--------------------+
+```
+
+Input null value.
+
+```sql
+select sec(null);
+```
+
+```text
++--------------------+
+| sec(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
new file mode 100644
index 00000000000..7d13ab7ef63
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/cot.md
@@ -0,0 +1,55 @@
+---
+{
+ "title": "COT",
+ "language": "zh-CN"
+}
+---
+
+## 描述
+
+返回 x 的余切值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。
+
+## 语法
+
+```sql
+COT(<x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<x>` | 需要被计算余切值的值 |
+
+## 返回值
+
+返回一个 Double 类型的值表示 x 的余切值。
+
+## 举例
+
+```sql
+select cot(1),cot(2),cot(1000);
+```
+
+```text
++--------------------+----------------------+--------------------+
+| cot(1) | cot(2) | cot(1000) |
++--------------------+----------------------+--------------------+
+| 0.6420926159343306 | -0.45765755436028577 | 0.6801221323348698 |
++--------------------+----------------------+--------------------+
+```
+
+
+输入null值。
+
+```sql
+select cot(null);
+```
+
+```text
++--------------------+
+| cot(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
new file mode 100644
index 00000000000..9905781833f
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/csc.md
@@ -0,0 +1,54 @@
+---
+{
+ "title": "CSC",
+ "language": "zh-CN"
+}
+---
+
+## 描述
+
+返回 x 的余割值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。
+
+## 语法
+
+```sql
+CSC(<x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<x>` | 需要被计算余割值的值 |
+
+## 返回值
+
+返回一个 Double 类型的值表示 x 的余割值。
+
+## 举例
+
+```sql
+select csc(1),csc(2),csc(1000);
+```
+
+```text
++--------------------+--------------------+------------------+
+| csc(1) | csc(2) | csc(1000) |
++--------------------+--------------------+------------------+
+| 1.1883951057781212 | 1.0997501702946164 | 1.20936599707935 |
++--------------------+--------------------+------------------+
+```
+
+输入null值。
+
+```sql
+select csc(null);
+```
+
+```text
++--------------------+
+| csc(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
new file mode 100644
index 00000000000..7000e5ac9ca
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/sec.md
@@ -0,0 +1,54 @@
+---
+{
+ "title": "SEC",
+ "language": "zh-CN"
+}
+---
+
+## 描述
+
+返回 x 的正割值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。
+
+## 语法
+
+```sql
+SEC(<x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<x>` | 需要被计算正割值的值 |
+
+## 返回值
+
+返回一个 Double 类型的值表示 x 的正割值。
+
+## 举例
+
+```sql
+select sec(1),sec(2),sec(1000);
+```
+
+```text
++--------------------+--------------------+--------------------+
+| sec(1) | sec(2) | sec(1000) |
++--------------------+--------------------+--------------------+
+| 1.8508157176809255 | -2.402997961722381 | 1.7781600385912715 |
++--------------------+--------------------+--------------------+
+```
+
+输入null值。
+
+```sql
+select sec(null);
+```
+
+```text
++--------------------+
+| sec(null) |
++--------------------+
+| NULL |
++--------------------+
+```
\ No newline at end of file
diff --git a/sidebars.json b/sidebars.json
index ba15225cb6a..08f9cee7e77 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -1104,6 +1104,8 @@
"sql-manual/sql-functions/scalar-functions/numeric-functions/conv",
"sql-manual/sql-functions/scalar-functions/numeric-functions/cos",
"sql-manual/sql-functions/scalar-functions/numeric-functions/cosh",
+
"sql-manual/sql-functions/scalar-functions/numeric-functions/cot",
+
"sql-manual/sql-functions/scalar-functions/numeric-functions/csc",
"sql-manual/sql-functions/scalar-functions/numeric-functions/degrees",
"sql-manual/sql-functions/scalar-functions/numeric-functions/e",
"sql-manual/sql-functions/scalar-functions/numeric-functions/exp",
@@ -1126,6 +1128,7 @@
"sql-manual/sql-functions/scalar-functions/numeric-functions/random",
"sql-manual/sql-functions/scalar-functions/numeric-functions/round",
"sql-manual/sql-functions/scalar-functions/numeric-functions/round-bankers",
+
"sql-manual/sql-functions/scalar-functions/numeric-functions/sec",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sign",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sin",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sinh",
@@ -1325,6 +1328,7 @@
"sql-manual/sql-functions/scalar-functions/date-time-functions/year",
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil",
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor",
+
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week",
"sql-manual/sql-functions/scalar-functions/date-time-functions/yearweek",
"sql-manual/sql-functions/scalar-functions/date-time-functions/years-add",
"sql-manual/sql-functions/scalar-functions/date-time-functions/years-diff",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]