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 0000000000000..b1c7dcf8005ab --- /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() +``` + +## Parameters + +| Parameter | Description | +| -- | -- | +| `` | 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 0000000000000..d160fdbbf0aab --- /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() +``` + +## Parameters + +| Parameter | Description | +| -- | -- | +| `` | 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 0000000000000..2e033f91ffb62 --- /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() +``` + +## Parameters + +| Parameter | Description | +| -- | -- | +| `` | 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 0000000000000..7d13ab7ef6366 --- /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() +``` + +## 参数 + +| 参数 | 说明 | +| -- | -- | +| `` | 需要被计算余切值的值 | + +## 返回值 + +返回一个 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 0000000000000..9905781833f55 --- /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() +``` + +## 参数 + +| 参数 | 说明 | +| -- | -- | +| `` | 需要被计算余割值的值 | + +## 返回值 + +返回一个 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 0000000000000..7000e5ac9ca52 --- /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() +``` + +## 参数 + +| 参数 | 说明 | +| -- | -- | +| `` | 需要被计算正割值的值 | + +## 返回值 + +返回一个 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 1cad785a6db2e..06dc0b8d968ec 100644 --- a/sidebars.json +++ b/sidebars.json @@ -1103,6 +1103,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", @@ -1125,6 +1127,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", @@ -1320,6 +1323,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",