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 1c4f061705f [fix] (function) support Concat_ws function multi arrays 
(#2634)
1c4f061705f is described below

commit 1c4f061705fdc8238e947f20d11c7e0fc9b0269b
Author: dwdwqfwe <[email protected]>
AuthorDate: Mon Jul 28 16:19:37 2025 +0800

    [fix] (function) support Concat_ws function multi arrays (#2634)
    
    ## Versions
    
    - [x] dev
    - [x] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../scalar-functions/string-functions/concat-ws.md | 120 ++++++++++++++++++--
 .../scalar-functions/string-functions/concat-ws.md | 123 +++++++++++++++++++--
 .../scalar-functions/string-functions/concat-ws.md | 123 +++++++++++++++++++--
 .../scalar-functions/string-functions/concat-ws.md | 120 ++++++++++++++++++--
 4 files changed, 452 insertions(+), 34 deletions(-)

diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md 
b/docs/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
index f5cbb0340c7..f1850ceb72c 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
@@ -7,32 +7,35 @@
 
 ## Description
 
-Use the first parameter sep as the connector to concatenate the second 
parameter and all subsequent parameters (or all strings in ARRAY) into a 
string. Special cases:
+Use the first parameter sep as the connector to concatenate the second 
parameter and all subsequent parameters (or all strings in one ARRAY or multi 
ARRAY ) into a string. Special cases:
 
 - If the separator is NULL, NULL is returned.
 
-The `CONCAT_WS` function does not skip empty strings, but skips NULL values.
-
+- The `CONCAT_WS` function does not skip empty strings, but skips NULL values.
+- The `CONCAT_WS` function does not skip empty strings in any `ARRAY` 
parameters, but skips NULL values in `ARRAY`.
+- The `CONCAT_WS` function does not skip NULL parameter if input multi 
arrays,return empty string.
+- The first parameters must be a `string` type, and the others must be the 
same type ,belong to the `string` or `ARRAY` type 
 ## Syntax
 
 ```sql
 CONCAT_WS ( <sep> , <str> [ , <str> ] )
-CONCAT_WS ( <sep> , <array> )
+CONCAT_WS ( <sep> , <array> [ , <array> ])
 ```
 
 ## Parameters
 
 | Parameter | Description |
 |-------|-----------------|
-| `<sep>` | Connector for concatenating strings |
-| `<str>` | String to be concatenated |
-| `<array>` | Array to be concatenated |
+| `<sep>` | Connector for concatenating strings, it is `string` type or 
`varchar` type |
+| `<str>` | String to be concatenated , it is `string` or `varchar` type|
+| `<array>` | Array to be concatenated ,it is `ARRAY` type, and every element 
is `string` or `varchar` type|
 
 ## Return value
 
 Parameter `<sep>` or `<array>` The string concatenated with `<str>`. Special 
cases:
 
 - If delimiter is NULL, returns NULL.
+- If parameters with mutlti arrays and it contains a null,function will return 
empty string.
 
 ## Example
 
@@ -62,4 +65,107 @@ SELECT CONCAT_WS("or", ["d", "is"]),CONCAT_WS(NULL, ["d", 
"is"]),CONCAT_WS("or",
 
+------------------------------+------------------------------+------------------------------------+
 | doris                        | NULL                         | doris          
                    |
 
+------------------------------+------------------------------+------------------------------------+
+```
+
+Concatenating multiple arrays
+
+```sql
+mysql> SELECT CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]);
+
++------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]) |
++------------------------------------------------+
+| a-b-c-d                                        |
++------------------------------------------------+
+```
+
+Handling NULL in string parameters
+
+```sql
+mysql> SELECT CONCAT_WS("|", "hello", "", "world", NULL);
+
++--------------------------------------------+
+| CONCAT_WS("|", "hello", "", "world", NULL) |
++--------------------------------------------+
+| hello||world                               |
++--------------------------------------------+
+```
+
+Return empty if NULL in multi arrays;
+
+```sql
+mysql>  SELECT CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]);
++-----------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]) |
++-----------------------------------------------------+
+|                                                     |
++-----------------------------------------------------+
+```
+
+Mixing strings and arrays (invalid)
+
+```sql
+mysql> SELECT CONCAT_WS(",", "a", ["b", "c"]);
+
+ERROR 1105 (HY000): errCode = 2, detailMessage = can not cast from origin type 
ARRAY<VARCHAR(1)> to target type=VARCHAR(65533)
+
+```
+
+ All NULL inputs
+
+ ```sql
+ mysql> SELECT CONCAT_WS("x", NULL, NULL);
+
++----------------------------+
+| CONCAT_WS("x", NULL, NULL) |
++----------------------------+
+|                            |
++----------------------------+
+ ```
+
+Chiese Charactors concat 
+
+```sql
+mysql> SELECT CONCAT_WS("x", '中文', '中文');
+
++------------------------------------+
+| CONCAT_WS("x", '中文', '中文')     |
++------------------------------------+
+| 中文x中文                          |
++------------------------------------+
+```
+
+Chinese charactors in multi arrays
+
+```sql
+mysql> SELECT CONCAT_WS("x", ['中文'], ['中文']);
++----------------------------------------+
+| CONCAT_WS("x", ['中文'], ['中文'])     |
++----------------------------------------+
+| 中文x中文                              |
++----------------------------------------+
+```
+
+Insert and concat them
+
+```sql
+DROP TABLE IF EXISTS test_concat_ws_1;
+
+CREATE TABLE test_concat_ws_1 (id INT, a ARRAY<VARCHAR>, b ARRAY<VARCHAR>) 
ENGINE=OLAP DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = 
'1')
+
+INSERT INTO test_concat_ws_1 VALUES (1, ['a','b'], ['css',null,'d']), (2, 
['x',null], ['y','z']),(3,['你好','世界'],['Doris',null,'Nereids'])
+
+SELECT concat_ws('-', a, b) FROM test_concat_ws_1 ORDER BY id
+
+```
+
+```text
+
++-----------------------------+
+| concat_ws('-', a, b)        |
++-----------------------------+
+| a-b-css-d                   |
+| x-y-z                       |
+| 你好-世界-Doris-Nereids     |
++-----------------------------+
 ```
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
index 2753c3d4ea1..a90445b8f6a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
@@ -7,26 +7,27 @@
 
 ## 描述
 
-使用第一个参数 sep 作为连接符,将第二个参数以及后续所有参数 (或 ARRAY 中的所有字符串) 拼接成一个字符串。特殊情况:
-
-- 如果分隔符是 NULL,返回 NULL。
-
-`CONCAT_WS`函数不会跳过空字符串,会跳过 NULL 值。
+使用第一个参数sep作为连接符,将第二个参数及后续所有参数(或一个数组、多个数组中的所有字符串)拼接成一个字符串。特殊情况:
 
+- 若分隔符为 NULL,则返回 NULL。​
+- CONCAT_WS函数不跳过空字符串(""),但会跳过 NULL 值。​
+- CONCAT_WS函数不跳过任何数组参数中的空字符串,但会跳过数组中的NULL 值。​
+- ​CONCAT_WS函数不会跳过NULL如果输入多个数组参数,会返回空字符串。
+- 第一个参数必须为字符串类型(string 或 varchar),其他参数必须为相同类型,即均为字符串类型(string 或 
varchar)或均为数组类型(ARRAY)。
 ## 语法
 
 ```sql
 CONCAT_WS ( <sep> , <str> [ , <str> ] )
-CONCAT_WS ( <sep> , <array> )
+CONCAT_WS ( <sep> , <array> [ , <array> ])
 ```
 
 ## 参数
 
 | 参数    | 说明              |
 |-------|-----------------|
-| `<sep>` | 拼接字符串的连接符       |
-| `<str>` | 需要被拼接的字符串       |
-| `<array>` | 需要被拼接的 array 数组 |
+| `<sep>` | 用于拼接字符串的连接符,类型为 string 或 varchar       |
+| `<str>` | 待拼接的字符串,类型为 string 或 varchar       |
+| `<array>` | 待拼接的数组,类型为 ARRAY,且数组元素为 string 或 varchar |
 
 
 ## 返回值
@@ -34,7 +35,7 @@ CONCAT_WS ( <sep> , <array> )
 参数 `<sep>` 或者 `<array>` 数组使用 `<str>` 拼接后字符串。特殊情况:
 
 - 如果分隔符是 NULL,返回 NULL。
-
+- 如果多个数组参数中含有NULL参数,则返回空字符串
 ## 举例
 
 将字符串通过 or 拼接到一起
@@ -63,4 +64,106 @@ SELECT CONCAT_WS("or", ["d", "is"]),CONCAT_WS(NULL, ["d", 
"is"]),CONCAT_WS("or",
 
+------------------------------+------------------------------+------------------------------------+
 | doris                        | NULL                         | doris          
                    |
 
+------------------------------+------------------------------+------------------------------------+
+```
+拼接多个数组
+
+```sql
+mysql> SELECT CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]);
+
++------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]) |
++------------------------------------------------+
+| a-b-c-d                                        |
++------------------------------------------------+
+```
+
+如果在多个数组参数中包含NULL参数,则返回空字符串;
+
+```sql
+mysql>  SELECT CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]);
++-----------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]) |
++-----------------------------------------------------+
+|                                                     |
++-----------------------------------------------------+
+```
+
+处理空字符串
+
+```sql
+mysql> SELECT CONCAT_WS("|", "hello", "", "world", NULL);
+
++--------------------------------------------+
+| CONCAT_WS("|", "hello", "", "world", NULL) |
++--------------------------------------------+
+| hello||world                               |
++--------------------------------------------+
+```
+
+混合字符串和数组(无效)
+
+```sql
+mysql> SELECT CONCAT_WS(",", "a", ["b", "c"]);
+
+ERROR 1105 (HY000): errCode = 2, detailMessage = can not cast from origin type 
ARRAY<VARCHAR(1)> to target type=VARCHAR(65533)
+
+```
+
+全为 NULL 的输入
+
+ ```sql
+ mysql> SELECT CONCAT_WS("x", NULL, NULL);
+
++----------------------------+
+| CONCAT_WS("x", NULL, NULL) |
++----------------------------+
+|                            |
++----------------------------+
+ ```
+
+Chiese Charactors concat 
+
+```sql
+mysql> SELECT CONCAT_WS("x", '中文', '中文');
+
++------------------------------------+
+| CONCAT_WS("x", '中文', '中文')     |
++------------------------------------+
+| 中文x中文                          |
++------------------------------------+
+```
+
+中文字符拼接
+
+```sql
+mysql> SELECT CONCAT_WS("x", ['中文'], ['中文']);
++----------------------------------------+
+| CONCAT_WS("x", ['中文'], ['中文'])     |
++----------------------------------------+
+| 中文x中文                              |
++----------------------------------------+
+```
+
+插入数据并拼接
+
+```sql
+DROP TABLE IF EXISTS test_concat_ws_1;
+
+CREATE TABLE test_concat_ws_1 (id INT, a ARRAY<VARCHAR>, b ARRAY<VARCHAR>) 
ENGINE=OLAP DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = 
'1')
+
+INSERT INTO test_concat_ws_1 VALUES (1, ['a','b'], ['css',null,'d']), (2, 
['x',null], ['y','z']),(3,['你好','世界'],['Doris',null,'Nereids'])
+
+SELECT concat_ws('-', a, b) FROM test_concat_ws_1 ORDER BY id
+
+```
+
+```text
+
++-----------------------------+
+| concat_ws('-', a, b)        |
++-----------------------------+
+| a-b-css-d                   |
+| x-y-z                       |
+| 你好-世界-Doris-Nereids     |
++-----------------------------+
 ```
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
index 2753c3d4ea1..ed81acc93a9 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
@@ -7,26 +7,27 @@
 
 ## 描述
 
-使用第一个参数 sep 作为连接符,将第二个参数以及后续所有参数 (或 ARRAY 中的所有字符串) 拼接成一个字符串。特殊情况:
-
-- 如果分隔符是 NULL,返回 NULL。
-
-`CONCAT_WS`函数不会跳过空字符串,会跳过 NULL 值。
+使用第一个参数sep作为连接符,将第二个参数及后续所有参数(或一个数组、多个数组中的所有字符串)拼接成一个字符串。特殊情况:
 
+- 若分隔符为 NULL,则返回 NULL。​
+- CONCAT_WS函数不跳过空字符串(""),但会跳过 NULL 值。​
+- CONCAT_WS函数不跳过任何数组参数中的空字符串,但会跳过数组中的 NULL 值。
+- ​CONCAT_WS函数不会跳过NULL如果输入多个数组参数,会返回空字符串。
+- 第一个参数必须为字符串类型(string 或 varchar),其他参数必须为相同类型,即均为字符串类型(string 或 
varchar)或均为数组类型(ARRAY)。
 ## 语法
 
 ```sql
 CONCAT_WS ( <sep> , <str> [ , <str> ] )
-CONCAT_WS ( <sep> , <array> )
+CONCAT_WS ( <sep> , <array> [ , <array> ])
 ```
 
 ## 参数
 
 | 参数    | 说明              |
 |-------|-----------------|
-| `<sep>` | 拼接字符串的连接符       |
-| `<str>` | 需要被拼接的字符串       |
-| `<array>` | 需要被拼接的 array 数组 |
+| `<sep>` | 用于拼接字符串的连接符,类型为 string 或 varchar       |
+| `<str>` | 待拼接的字符串,类型为 string 或 varchar       |
+| `<array>` | 待拼接的数组,类型为 ARRAY,且数组元素为 string 或 varchar |
 
 
 ## 返回值
@@ -34,7 +35,7 @@ CONCAT_WS ( <sep> , <array> )
 参数 `<sep>` 或者 `<array>` 数组使用 `<str>` 拼接后字符串。特殊情况:
 
 - 如果分隔符是 NULL,返回 NULL。
-
+- 如果多个数组参数中含有NULL参数,则返回空字符串
 ## 举例
 
 将字符串通过 or 拼接到一起
@@ -63,4 +64,106 @@ SELECT CONCAT_WS("or", ["d", "is"]),CONCAT_WS(NULL, ["d", 
"is"]),CONCAT_WS("or",
 
+------------------------------+------------------------------+------------------------------------+
 | doris                        | NULL                         | doris          
                    |
 
+------------------------------+------------------------------+------------------------------------+
+```
+拼接多个数组
+
+```sql
+mysql> SELECT CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]);
+
++------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]) |
++------------------------------------------------+
+| a-b-c-d                                        |
++------------------------------------------------+
+```
+
+如果在多个数组参数中包含NULL参数,则返回空字符串;
+
+```sql
+mysql>  SELECT CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]);
++-----------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]) |
++-----------------------------------------------------+
+|                                                     |
++-----------------------------------------------------+
+```
+
+处理空字符串
+
+```sql
+mysql> SELECT CONCAT_WS("|", "hello", "", "world", NULL);
+
++--------------------------------------------+
+| CONCAT_WS("|", "hello", "", "world", NULL) |
++--------------------------------------------+
+| hello||world                               |
++--------------------------------------------+
+```
+
+混合字符串和数组(无效)
+
+```sql
+mysql> SELECT CONCAT_WS(",", "a", ["b", "c"]);
+
+ERROR 1105 (HY000): errCode = 2, detailMessage = can not cast from origin type 
ARRAY<VARCHAR(1)> to target type=VARCHAR(65533)
+
+```
+
+全为 NULL 的输入
+
+ ```sql
+ mysql> SELECT CONCAT_WS("x", NULL, NULL);
+
++----------------------------+
+| CONCAT_WS("x", NULL, NULL) |
++----------------------------+
+|                            |
++----------------------------+
+ ```
+
+Chiese Charactors concat 
+
+```sql
+mysql> SELECT CONCAT_WS("x", '中文', '中文');
+
++------------------------------------+
+| CONCAT_WS("x", '中文', '中文')     |
++------------------------------------+
+| 中文x中文                          |
++------------------------------------+
+```
+
+中文字符拼接
+
+```sql
+mysql> SELECT CONCAT_WS("x", ['中文'], ['中文']);
++----------------------------------------+
+| CONCAT_WS("x", ['中文'], ['中文'])     |
++----------------------------------------+
+| 中文x中文                              |
++----------------------------------------+
+```
+
+插入数据并拼接
+
+```sql
+DROP TABLE IF EXISTS test_concat_ws_1;
+
+CREATE TABLE test_concat_ws_1 (id INT, a ARRAY<VARCHAR>, b ARRAY<VARCHAR>) 
ENGINE=OLAP DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = 
'1')
+
+INSERT INTO test_concat_ws_1 VALUES (1, ['a','b'], ['css',null,'d']), (2, 
['x',null], ['y','z']),(3,['你好','世界'],['Doris',null,'Nereids'])
+
+SELECT concat_ws('-', a, b) FROM test_concat_ws_1 ORDER BY id
+
+```
+
+```text
+
++-----------------------------+
+| concat_ws('-', a, b)        |
++-----------------------------+
+| a-b-css-d                   |
+| x-y-z                       |
+| 你好-世界-Doris-Nereids     |
++-----------------------------+
 ```
\ No newline at end of file
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
 
b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
index f5cbb0340c7..f1850ceb72c 100644
--- 
a/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/concat-ws.md
@@ -7,32 +7,35 @@
 
 ## Description
 
-Use the first parameter sep as the connector to concatenate the second 
parameter and all subsequent parameters (or all strings in ARRAY) into a 
string. Special cases:
+Use the first parameter sep as the connector to concatenate the second 
parameter and all subsequent parameters (or all strings in one ARRAY or multi 
ARRAY ) into a string. Special cases:
 
 - If the separator is NULL, NULL is returned.
 
-The `CONCAT_WS` function does not skip empty strings, but skips NULL values.
-
+- The `CONCAT_WS` function does not skip empty strings, but skips NULL values.
+- The `CONCAT_WS` function does not skip empty strings in any `ARRAY` 
parameters, but skips NULL values in `ARRAY`.
+- The `CONCAT_WS` function does not skip NULL parameter if input multi 
arrays,return empty string.
+- The first parameters must be a `string` type, and the others must be the 
same type ,belong to the `string` or `ARRAY` type 
 ## Syntax
 
 ```sql
 CONCAT_WS ( <sep> , <str> [ , <str> ] )
-CONCAT_WS ( <sep> , <array> )
+CONCAT_WS ( <sep> , <array> [ , <array> ])
 ```
 
 ## Parameters
 
 | Parameter | Description |
 |-------|-----------------|
-| `<sep>` | Connector for concatenating strings |
-| `<str>` | String to be concatenated |
-| `<array>` | Array to be concatenated |
+| `<sep>` | Connector for concatenating strings, it is `string` type or 
`varchar` type |
+| `<str>` | String to be concatenated , it is `string` or `varchar` type|
+| `<array>` | Array to be concatenated ,it is `ARRAY` type, and every element 
is `string` or `varchar` type|
 
 ## Return value
 
 Parameter `<sep>` or `<array>` The string concatenated with `<str>`. Special 
cases:
 
 - If delimiter is NULL, returns NULL.
+- If parameters with mutlti arrays and it contains a null,function will return 
empty string.
 
 ## Example
 
@@ -62,4 +65,107 @@ SELECT CONCAT_WS("or", ["d", "is"]),CONCAT_WS(NULL, ["d", 
"is"]),CONCAT_WS("or",
 
+------------------------------+------------------------------+------------------------------------+
 | doris                        | NULL                         | doris          
                    |
 
+------------------------------+------------------------------+------------------------------------+
+```
+
+Concatenating multiple arrays
+
+```sql
+mysql> SELECT CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]);
+
++------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], ["c", NULL], ["d"]) |
++------------------------------------------------+
+| a-b-c-d                                        |
++------------------------------------------------+
+```
+
+Handling NULL in string parameters
+
+```sql
+mysql> SELECT CONCAT_WS("|", "hello", "", "world", NULL);
+
++--------------------------------------------+
+| CONCAT_WS("|", "hello", "", "world", NULL) |
++--------------------------------------------+
+| hello||world                               |
++--------------------------------------------+
+```
+
+Return empty if NULL in multi arrays;
+
+```sql
+mysql>  SELECT CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]);
++-----------------------------------------------------+
+| CONCAT_WS("-", ["a", "b"], null,["c", NULL], ["d"]) |
++-----------------------------------------------------+
+|                                                     |
++-----------------------------------------------------+
+```
+
+Mixing strings and arrays (invalid)
+
+```sql
+mysql> SELECT CONCAT_WS(",", "a", ["b", "c"]);
+
+ERROR 1105 (HY000): errCode = 2, detailMessage = can not cast from origin type 
ARRAY<VARCHAR(1)> to target type=VARCHAR(65533)
+
+```
+
+ All NULL inputs
+
+ ```sql
+ mysql> SELECT CONCAT_WS("x", NULL, NULL);
+
++----------------------------+
+| CONCAT_WS("x", NULL, NULL) |
++----------------------------+
+|                            |
++----------------------------+
+ ```
+
+Chiese Charactors concat 
+
+```sql
+mysql> SELECT CONCAT_WS("x", '中文', '中文');
+
++------------------------------------+
+| CONCAT_WS("x", '中文', '中文')     |
++------------------------------------+
+| 中文x中文                          |
++------------------------------------+
+```
+
+Chinese charactors in multi arrays
+
+```sql
+mysql> SELECT CONCAT_WS("x", ['中文'], ['中文']);
++----------------------------------------+
+| CONCAT_WS("x", ['中文'], ['中文'])     |
++----------------------------------------+
+| 中文x中文                              |
++----------------------------------------+
+```
+
+Insert and concat them
+
+```sql
+DROP TABLE IF EXISTS test_concat_ws_1;
+
+CREATE TABLE test_concat_ws_1 (id INT, a ARRAY<VARCHAR>, b ARRAY<VARCHAR>) 
ENGINE=OLAP DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = 
'1')
+
+INSERT INTO test_concat_ws_1 VALUES (1, ['a','b'], ['css',null,'d']), (2, 
['x',null], ['y','z']),(3,['你好','世界'],['Doris',null,'Nereids'])
+
+SELECT concat_ws('-', a, b) FROM test_concat_ws_1 ORDER BY id
+
+```
+
+```text
+
++-----------------------------+
+| concat_ws('-', a, b)        |
++-----------------------------+
+| a-b-css-d                   |
+| x-y-z                       |
+| 你好-世界-Doris-Nereids     |
++-----------------------------+
 ```
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to