Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Returns a format string. The results for different arguments are shown in the ta
If the second argument is not one of `'USA', 'JIS', 'ISO', 'EUR', 'INTERNAL'` or is NULL, the function returns NULL.

## Examples
<!-- setup-sql
CREATE TABLE get_format_test (id INT, lc VARCHAR(20)) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO get_format_test VALUES (1,'USA'),(2,'JIS'),(3,'ISO'),(4,'EUR'),(5,'INTERNAL'),(6,'Doris');
-->

```sql
SELECT * FROM get_format_test
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Returns a value of type TIME, in the format `hour:minute:second`. When the input

## Example

<!-- setup-sql
CREATE TABLE test_maketime (id INT, `hour` BIGINT, `minute` BIGINT, sec FLOAT) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO test_maketime VALUES (1,12,15,30),(2,14,56,12.5789),(3,1234,11,4),(4,-1234,6,52),(5,20,60,12),(6,14,51,66),(7,NULL,15,16),(8,7,NULL,8),(9,1,2,NULL),(10,23,-40,12),(11,20,6,-12);
-->

```sql
SELECT `hour`, `minute`, `sec`, MAKETIME(`hour`, `minute`, `sec`) AS ans FROM `test_maketime`;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ select ipv4_num_to_string(3232235521);
+--------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ select ipv4_string_to_num_or_null('192.168.0.1');
+-------------------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ Returns a VARCHAR value with the converted encoding, allowing proper pinyin-base

## Examples

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ GET_FORMAT({DATE|DATETIME|TIME}, {'EUR'|'USA'|'JIS'|'ISO'|'INTERNAL'})
当第二个参数不为 `'USA', 'JIS', 'ISO', 'EUR', 'INTERNAL'` 之一或者为 NULL 时返回 NULL

## 举例
<!-- setup-sql
CREATE TABLE get_format_test (id INT, lc VARCHAR(20)) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO get_format_test VALUES (1,'USA'),(2,'JIS'),(3,'ISO'),(4,'EUR'),(5,'INTERNAL'),(6,'Doris');
-->

```sql
SELECT * FROM get_format_test
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ MAKETIME(`<hour>`, `<minute>`, `<second>`)

## 举例

<!-- setup-sql
CREATE TABLE test_maketime (id INT, `hour` BIGINT, `minute` BIGINT, sec FLOAT) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO test_maketime VALUES (1,12,15,30),(2,14,56,12.5789),(3,1234,11,4),(4,-1234,6,52),(5,20,60,12),(6,14,51,66),(7,NULL,15,16),(8,7,NULL,8),(9,1,2,NULL),(10,23,-40,12),(11,20,6,-12);
-->

```sql
SELECT `hour`, `minute`, `sec`, MAKETIME(`hour`, `minute`, `sec`) AS ans FROM `test_maketime`;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ select ipv4_num_to_string(3232235521);
| 192.168.0.1 |
+--------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ select ipv4_string_to_num_or_null('192.168.0.1');
| 3232235521 |
+-------------------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ CONVERT_TO(<column>, <character>)

## 举例

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-num-to-string.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-section-order

SQL function docs must contain sections in this order%3A Description%2C Syntax%2C Parameters%2C Return Value%2C Example. Missing%3A Example. Owner%3A @zclllyybb

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-num-to-string.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-title-duplicate

Rendered SEO title is duplicated across indexable pages%3A "IPV4_NUM_TO_STRING - Apache Doris". Add a version%2C locale%2C or page-specific qualifier. Owner%3A @zclllyybb
{
"title": "IPV4_NUM_TO_STRING",
"language": "zh-CN",
Expand Down Expand Up @@ -37,6 +37,11 @@
| 192.168.0.1 |
+--------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-string-to-num-or-null.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-section-order

SQL function docs must contain sections in this order%3A Description%2C Syntax%2C Parameters%2C Return Value%2C Example. Missing%3A Example. Owner%3A @zclllyybb

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-string-to-num-or-null.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 71. Owner%3A @zclllyybb
{
"title": "IPV4_STRING_TO_NUM_OR_NULL",
"language": "zh-CN",
Expand Down Expand Up @@ -37,6 +37,11 @@
| 3232235521 |
+-------------------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/other-functions/convert-to.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-section-order

SQL function docs must contain sections in this order%3A Description%2C Syntax%2C Parameters%2C Return Value%2C Example. Missing%3A Example. Owner%3A @zclllyybb
{
"title": "CONVERT_TO",
"language": "zh-CN",
Expand All @@ -9,14 +9,14 @@
## 描述

将指定的 VARCHAR 列的字符编码转换为目标字符集,常用于 ORDER BY 子句中对包含中文的列进行按拼音排序。当前仅支持将 `<character>` 转换为 `'gbk'` 编码。

Check notice on line 12 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/other-functions/convert-to.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-parameters-table

Parameters section must be a Markdown table with Parameter and Description columns. Owner%3A @zclllyybb
## 语法

```sql
CONVERT_TO(<column>, <character>)
```

## 参数

Check notice on line 19 in i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/other-functions/convert-to.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-return-null

Return Value section must document NULL return conditions%2C including when the function never returns NULL. Owner%3A @zclllyybb

| 参数 | 说明 |
|----------------|-------------------------------------------------------|
Expand All @@ -29,6 +29,11 @@

## 举例

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-num-to-string.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-title-duplicate

Rendered SEO title is duplicated across indexable pages%3A "IPV4_NUM_TO_STRING - Apache Doris". Add a version%2C locale%2C or page-specific qualifier. Owner%3A @zclllyybb
{
"title": "IPV4_NUM_TO_STRING",
"language": "zh-CN",
Expand Down Expand Up @@ -37,6 +37,11 @@
| 192.168.0.1 |
+--------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-string-to-num-or-null.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 71. Owner%3A @zclllyybb
{
"title": "IPV4_STRING_TO_NUM_OR_NULL",
"language": "zh-CN",
Expand Down Expand Up @@ -37,6 +37,11 @@
| 3232235521 |
+-------------------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ CONVERT_TO(<column>, <character>)

## 举例

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/get-format.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 10. Owner%3A @zclllyybb
{
"title": "GET_FORMAT",
"language": "zh-CN",
Expand All @@ -10,7 +10,7 @@

返回特定的格式字符串

该函数与 mysql 中的 [GET_FORMAT 函数](https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format) 行为一致

Check notice on line 13 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/get-format.md

View workflow job for this annotation

GitHub Actions / Build Check

link-external-report-only

External link is report-only and was not fetched%3A https%3A//dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format. Owner%3A @zclllyybb


## 语法
Expand Down Expand Up @@ -43,6 +43,11 @@
当第二个参数不为 `'USA', 'JIS', 'ISO', 'EUR', 'INTERNAL'` 之一或者为 NULL 时返回 NULL

## 举例
<!-- setup-sql
CREATE TABLE get_format_test (id INT, lc VARCHAR(20)) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO get_format_test VALUES (1,'USA'),(2,'JIS'),(3,'ISO'),(4,'EUR'),(5,'INTERNAL'),(6,'Doris');
-->

```sql
SELECT * FROM get_format_test
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/maketime.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 31. Owner%3A @zclllyybb
{
"title": "MAKETIME",
"language": "zh-CN",
Expand All @@ -10,7 +10,7 @@

返回根据`hour`, `minute`, `second`组合出的时间值

该函数与 mysql 中的 [makedate 函数](https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_maketime) 行为一致。

Check notice on line 13 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/maketime.md

View workflow job for this annotation

GitHub Actions / Build Check

link-external-report-only

External link is report-only and was not fetched%3A https%3A//dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_maketime. Owner%3A @zclllyybb

## 语法

Expand All @@ -21,7 +21,7 @@
## 参数

| 参数 | 说明 |
| ---- | ---- |

Check warning on line 24 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/maketime.md

View workflow job for this annotation

GitHub Actions / Build Check

markdown-cjk-spacing

Chinese text should contain spaces around adjacent English words or numbers. Owner%3A @zclllyybb
| `hour` | 时间的小时部分,支持整数类型(BIGINT)。取值范围被限制在 [-838, 838], 若输入值超过该范围,则自动修正为最接近的边界值。 |
| `minute` | 时间的分钟部分,支持整数类型(BITINT)。允许的取值范围为 [0, 59]。 |
| `second` | 时间的秒数部分,支持整数(BIGINT)和小数类型(DOUBLE)。允许的取值范围为 [0, 60), 支持小数点后六位精度,若超过六位,会自动进行四舍五入。 |
Expand All @@ -35,6 +35,11 @@

## 举例

<!-- setup-sql
CREATE TABLE test_maketime (id INT, `hour` BIGINT, `minute` BIGINT, sec FLOAT) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO test_maketime VALUES (1,12,15,30),(2,14,56,12.5789),(3,1234,11,4),(4,-1234,6,52),(5,20,60,12),(6,14,51,66),(7,NULL,15,16),(8,7,NULL,8),(9,1,2,NULL),(10,23,-40,12),(11,20,6,-12);
-->

```sql
SELECT `hour`, `minute`, `sec`, MAKETIME(`hour`, `minute`, `sec`) AS ans FROM `test_maketime`;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ select ipv4_num_to_string(3232235521);
| 192.168.0.1 |
+--------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/ip-functions/ipv4-string-to-num-or-null.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 71. Owner%3A @zclllyybb
{
"title": "IPV4_STRING_TO_NUM_OR_NULL",
"language": "zh-CN",
Expand Down Expand Up @@ -37,6 +37,11 @@
| 3232235521 |
+-------------------------------------------+
```
<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ CONVERT_TO(<column>, <character>)

## 举例

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ select ipv4_num_to_string(3232235521);
+--------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ select ipv4_string_to_num_or_null('192.168.0.1');
+-------------------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Description

Converts the character encoding of a column to a specified target character set. This function is typically used in the ORDER BY clause to ensure that columns containing Chinese characters are sorted according to their pinyin order. Currently, only conversion to `'gbk'` is supported.

Check notice on line 12 in versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/other-functions/convert-to.md

View workflow job for this annotation

GitHub Actions / Build Check

sql-function-parameters-table

Parameters section must be a Markdown table with Parameter and Description columns. Owner%3A @zclllyybb
## Syntax

```sql
Expand All @@ -29,6 +29,11 @@

## Examples

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ select ipv4_num_to_string(3232235521);
+--------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ select ipv4_string_to_num_or_null('192.168.0.1');
+-------------------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ Returns a VARCHAR value with the converted encoding, allowing proper pinyin-base

## Examples

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/get-format.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 33. Owner%3A @zclllyybb
{
"title": "GET_FORMAT",
"language": "en",
Expand All @@ -10,7 +10,7 @@

Returns a specific format string.

This function behaves the same as the MySQL [GET_FORMAT function](https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format).

Check notice on line 13 in versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/get-format.md

View workflow job for this annotation

GitHub Actions / Build Check

link-external-report-only

External link is report-only and was not fetched%3A https%3A//dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format. Owner%3A @zclllyybb


## Syntax
Expand Down Expand Up @@ -43,6 +43,11 @@
If the second argument is not one of `'USA', 'JIS', 'ISO', 'EUR', 'INTERNAL'` or is NULL, the function returns NULL.

## Examples
<!-- setup-sql
CREATE TABLE get_format_test (id INT, lc VARCHAR(20)) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO get_format_test VALUES (1,'USA'),(2,'JIS'),(3,'ISO'),(4,'EUR'),(5,'INTERNAL'),(6,'Doris');
-->

```sql
SELECT * FROM get_format_test
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/maketime.md

View workflow job for this annotation

GitHub Actions / Build Check

seo-description-length

SEO description should be 80-160 characters; current length is 74. Owner%3A @zclllyybb
{
"title": "MAKETIME",
"language": "en",
Expand All @@ -10,7 +10,7 @@

Returns a time value composed from the `hour`, `minute`, and `second` arguments.

This function behaves consistently with the [MAKETIME function](https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_maketime) in MySQL.

Check notice on line 13 in versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/date-time-functions/maketime.md

View workflow job for this annotation

GitHub Actions / Build Check

link-external-report-only

External link is report-only and was not fetched%3A https%3A//dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_maketime. Owner%3A @zclllyybb

## Syntax

Expand All @@ -35,6 +35,11 @@

## Example

<!-- setup-sql
CREATE TABLE test_maketime (id INT, `hour` BIGINT, `minute` BIGINT, sec FLOAT) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO test_maketime VALUES (1,12,15,30),(2,14,56,12.5789),(3,1234,11,4),(4,-1234,6,52),(5,20,60,12),(6,14,51,66),(7,NULL,15,16),(8,7,NULL,8),(9,1,2,NULL),(10,23,-40,12),(11,20,6,-12);
-->

```sql
SELECT `hour`, `minute`, `sec`, MAKETIME(`hour`, `minute`, `sec`) AS ans FROM `test_maketime`;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ select ipv4_num_to_string(3232235521);
+--------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_bi (num BIGINT) DISTRIBUTED BY HASH(num) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_bi VALUES (-1),(0),(2130706433),(4294967295),(4294967296);
-->

```sql
select num,ipv4_num_to_string(num) from ipv4_bi;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ select ipv4_string_to_num_or_null('192.168.0.1');
+-------------------------------------------+
```

<!-- setup-sql
CREATE TABLE ipv4_str (str VARCHAR(50)) DISTRIBUTED BY HASH(str) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO ipv4_str VALUES ('0.0.0.0'),('127.0.0.1'),('255.255.255.255'),('invalid');
-->

```sql
select str, ipv4_string_to_num_or_null(str) from ipv4_str;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ Returns a VARCHAR value with the converted encoding, allowing proper pinyin-base

## Examples

<!-- setup-sql
CREATE TABLE class_test (class_id INT, class_name VARCHAR(50), student_ids ARRAY<INT>) DISTRIBUTED BY HASH(class_id) BUCKETS 1 PROPERTIES("replication_num"="1");
INSERT INTO class_test VALUES (1,'啊',[1]),(2,'哈',[2]),(3,'哦',[3]),(4,'张',[4]),(5,'我',[5]),(6,'asd',[6]),(7,'qwe',[7]),(8,'z',[8]);
-->

```sql
SELECT * FROM class_test ORDER BY class_name;
```
Expand Down
Loading