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 f794c7930fb [Doc](function) fix arrays_overlap result (#2230)
f794c7930fb is described below

commit f794c7930fbf2c725f39def74cd69e7a8a1e14f2
Author: Jerry Hu <[email protected]>
AuthorDate: Fri Jul 18 11:48:20 2025 +0800

    [Doc](function) fix arrays_overlap result (#2230)
    
    https://github.com/apache/doris/pull/49403
    
    ## Versions
    
    - [x] dev
    - [ ] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../array-functions/arrays-overlap.md              | 33 +++++++++++++-------
 .../array-functions/arrays-overlap.md              | 35 +++++++++++++++-------
 2 files changed, 48 insertions(+), 20 deletions(-)

diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
index e3ef15c1692..2cff2270f10 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
@@ -24,18 +24,31 @@ ARRAYS_OVERLAP(<left>, <right>)
 
 ## Return Value
 
-Returns the judgment result: 1: left and right arrays have common elements; 0: 
left and right arrays do not have common elements; NULL: left or right array is 
NULL; or any element in left and right array is NULL
+Returns if left and right have any non-null elements in common. Returns null 
if there are no non-null elements in common but either array contains null.
 
 ## Example
 
-```sql
-SELECT ARRAYS_OVERLAP(['a', 'b', 'c'], [1, 2, 'b']);
 ```
-
-```text
-+--------------------------------------------------+
-| arrays_overlap(['a', 'b', 'c'], ['1', '2', 'b']) |
-+--------------------------------------------------+
-|                                                1 |
-+--------------------------------------------------+
+select arrays_overlap([1, 2, 3], [1, null]);
++--------------------------------------+
+| arrays_overlap([1, 2, 3], [1, null]) |
++--------------------------------------+
+|                                    1 |
++--------------------------------------+
+
+
+select arrays_overlap([2, 3], [1, null]);
++-----------------------------------+
+| arrays_overlap([2, 3], [1, null]) |
++-----------------------------------+
+|                              NULL |
++-----------------------------------+
+
+select arrays_overlap([2, 3], [1]);
++-----------------------------+
++-----------------------------+
+| arrays_overlap([2, 3], [1]) |
++-----------------------------+
+|                           0 |
++-----------------------------+
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
index 8ee7ac6be49..4e6854b8ce1 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/arrays-overlap.md
@@ -24,18 +24,33 @@ ARRAYS_OVERLAP(<left>, <right>)
 
 ## 返回值
 
-返回判断结果:1:left 和 right 数组存在公共元素;0:left 和 right 数组不存在公共元素;NULL:left 或者 right 数组为 
NULL;或者 left 和 right 数组中,任意元素为 NULL
+如果 left 和 right 具有任何非 null 的共同元素,则返回 true。
+如果没有非 null 的共同元素且任一数组包含 null,则返回 null。
+如果没有非 null 的共同元素,且 left 和 right 都不包含 null,则返回 false。
 
 ## 举例
 
-```sql
-SELECT ARRAYS_OVERLAP(['a', 'b', 'c'], [1, 2, 'b']);
 ```
-
-```text
-+--------------------------------------------------+
-| arrays_overlap(['a', 'b', 'c'], ['1', '2', 'b']) |
-+--------------------------------------------------+
-|                                                1 |
-+--------------------------------------------------+
+select arrays_overlap([1, 2, 3], [1, null]);
++--------------------------------------+
+| arrays_overlap([1, 2, 3], [1, null]) |
++--------------------------------------+
+|                                    1 |
++--------------------------------------+
+
+
+select arrays_overlap([2, 3], [1, null]);
++-----------------------------------+
+| arrays_overlap([2, 3], [1, null]) |
++-----------------------------------+
+|                              NULL |
++-----------------------------------+
+
+select arrays_overlap([2, 3], [1]);
++-----------------------------+
++-----------------------------+
+| arrays_overlap([2, 3], [1]) |
++-----------------------------+
+|                           0 |
++-----------------------------+
 ```


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

Reply via email to