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 259468b6d29 [docs](function) support array_contains_all function (#914)
259468b6d29 is described below

commit 259468b6d29dd3c8b877b1333af9f921336b94b3
Author: zhangstar333 <[email protected]>
AuthorDate: Mon Jul 29 10:43:00 2024 +0800

    [docs](function) support array_contains_all function (#914)
---
 .../array-functions/array-contains_all.md          | 84 ++++++++++++++++++++++
 .../array-functions/array-contains_all.md          | 83 +++++++++++++++++++++
 sidebars.json                                      |  1 +
 3 files changed, 168 insertions(+)

diff --git 
a/docs/sql-manual/sql-functions/array-functions/array-contains_all.md 
b/docs/sql-manual/sql-functions/array-functions/array-contains_all.md
new file mode 100644
index 00000000000..db49aa496b4
--- /dev/null
+++ b/docs/sql-manual/sql-functions/array-functions/array-contains_all.md
@@ -0,0 +1,84 @@
+---
+{
+    "title": "ARRAY_CONTAINS_ALL",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## array_contains_all
+
+array_contains_all
+
+### description
+
+#### Syntax
+
+`BOOLEAN array_contains_all(ARRAY<T> array1, ARRAY<T> array2)`
+
+check whether array1 contains the subarray array2, ensuring that the element 
order is exactly the same. The return results are as follows:
+
+```
+1    - array1 contains subarray array2;
+0    - array1 does not contain subarray array2;
+NULL - array1 or array2 is NULL.
+```
+
+### example
+
+```
+mysql [(none)]>select array_contains_all([1,2,3,4], [1,2,4]);
++---------------------------------------------+
+| array_contains_all([1, 2, 3, 4], [1, 2, 4]) |
++---------------------------------------------+
+|                                           0 |
++---------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], [1,2]);
++------------------------------------------+
+| array_contains_all([1, 2, 3, 4], [1, 2]) |
++------------------------------------------+
+|                                        1 |
++------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], []);
++--------------------------------------------------------------+
+| array_contains_all([1, 2, 3, 4], cast([] as ARRAY<TINYINT>)) |
++--------------------------------------------------------------+
+|                                                            1 |
++--------------------------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], NULL);
++----------------------------------------+
+| array_contains_all([1, 2, 3, 4], NULL) |
++----------------------------------------+
+|                                   NULL |
++----------------------------------------+
+1 row in set (0.00 sec)
+```
+
+### keywords
+
+ARRAY,CONTAIN,ARRAY_CONTAINS_ALL
+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/array-functions/array-contains_all.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/array-functions/array-contains_all.md
new file mode 100644
index 00000000000..7ed794ab296
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/array-functions/array-contains_all.md
@@ -0,0 +1,83 @@
+---
+{
+    "title": "ARRAY_CONTAINS_ALL",
+    "language": "zh-CN"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## array_contains_all
+
+array_contains_all
+
+### description
+
+#### Syntax
+
+`BOOLEAN array_contains_all(ARRAY<T> array1, ARRAY<T> array2)`
+
+判断数组array1中是否包含子数组array2,且需要保证元素顺序完全一致。返回结果如下:
+
+```
+1    - array1中存在子数组array2;
+0    - array1中不存在数组array2;
+NULL - array1或array2为NULL。
+```
+
+### example
+
+```
+mysql [(none)]>select array_contains_all([1,2,3,4], [1,2,4]);
++---------------------------------------------+
+| array_contains_all([1, 2, 3, 4], [1, 2, 4]) |
++---------------------------------------------+
+|                                           0 |
++---------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], [1,2]);
++------------------------------------------+
+| array_contains_all([1, 2, 3, 4], [1, 2]) |
++------------------------------------------+
+|                                        1 |
++------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], []);
++--------------------------------------------------------------+
+| array_contains_all([1, 2, 3, 4], cast([] as ARRAY<TINYINT>)) |
++--------------------------------------------------------------+
+|                                                            1 |
++--------------------------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql [(none)]>select array_contains_all([1,2,3,4], NULL);
++----------------------------------------+
+| array_contains_all([1, 2, 3, 4], NULL) |
++----------------------------------------+
+|                                   NULL |
++----------------------------------------+
+1 row in set (0.00 sec)
+```
+
+### keywords
+
+ARRAY,CONTAIN,ARRAY_CONTAINS_ALL
diff --git a/sidebars.json b/sidebars.json
index 91dad81eb62..b8fbb21c611 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -615,6 +615,7 @@
                                 
"sql-manual/sql-functions/array-functions/array-reverse-split",
                                 
"sql-manual/sql-functions/array-functions/array-position",
                                 
"sql-manual/sql-functions/array-functions/array-contains",
+                                
"sql-manual/sql-functions/array-functions/array-contains_all",
                                 
"sql-manual/sql-functions/array-functions/array-except",
                                 
"sql-manual/sql-functions/array-functions/array-product",
                                 
"sql-manual/sql-functions/array-functions/array-intersect",


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

Reply via email to