This is an automated email from the ASF dual-hosted git repository.
morningman 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 aaeed3f933f [docs] Complete MULTI_MATCH_ANY reference in dev and 4.x
(#1948)
aaeed3f933f is described below
commit aaeed3f933f749cfa0ec725382e72ca23a4162e4
Author: Kang <[email protected]>
AuthorDate: Sat Oct 17 05:41:23 2026 +0800
[docs] Complete MULTI_MATCH_ANY reference in dev and 4.x (#1948)
## Summary
Complete the MULTI_MATCH_ANY reference with formal syntax, parameters,
TINYINT results, Hyperscan/VectorScan behavior, NULL/empty-array
results, and representative SQL/output examples.
## Versions
- [x] dev
- [x] 4.x
- [ ] 3.x
- [ ] 2.1 or older
Dev and 4.x, English and Chinese. Existing newer
MULTI_SEARCH_ALL_POSITIONS, NGRAM_SEARCH, and TOKENIZE pages are
preserved. 3.x and older are outside this audit scope.
## Languages
- [x] Chinese
- [x] English
## Validation
Reviewed against Doris master `88f22fd875e0be4dea2c58c53744f4074378a870`
and the corresponding current 4.0, 4.1, and 4.2 source branches. Rebased
onto website master `f582020241f825849ffa3b57fc3220cb674d28a7`.
- SQL function structure and internal-link checks passed for the final
changed pages.
- `git diff --check` passed.
- English and Chinese changes are synchronized. Remaining version-sync
notices are explained above.
- Doris and the website were not built; examples were checked against
source and existing regression expectations where available.
Co-authored-by: morningman <[email protected]>
---
.../string-functions/multi-match-any.md | 80 ++++++++++++++++------
.../string-functions/multi-match-any.md | 76 +++++++++++++++-----
.../string-functions/multi-match-any.md | 76 +++++++++++++++-----
.../string-functions/multi-match-any.md | 80 ++++++++++++++++------
4 files changed, 232 insertions(+), 80 deletions(-)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
b/docs/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
index 5e6b330fca9..7a885e93982 100644
---
a/docs/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
+++
b/docs/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
@@ -2,35 +2,73 @@
{
"title": "MULTI_MATCH_ANY",
"language": "en",
- "description": "Checks whether the string haystack matches the regular
expressions patterns in re2 syntax."
+ "description": "Checks whether a string matches any regular expression in
an array."
}
---
-## multi_match_any
-### Description
-#### Syntax
+<a id="multi_match_any"></a>
-`TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns)`
+## Description
+Checks whether `<haystack>` matches any regular expression in `<patterns>`.
Matching is case-sensitive by default. Returns `0` rather than `NULL` when
either argument is `NULL`.
-Checks whether the string `haystack` matches the regular expressions
`patterns` in re2 syntax. returns 0 if none of the regular expressions are
matched and 1 if any of the patterns matches.
+## Syntax
-### example
+```sql
+MULTI_MATCH_ANY(<haystack>, <patterns>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| --- | --- |
+| `<haystack>` | Input string, of type `STRING`. |
+| `<patterns>` | Regular expressions, of type `ARRAY<STRING>`. Pattern
elements should be non-NULL strings. |
+
+## Return Value
+
+Returns `TINYINT`: `1` when any expression matches, otherwise `0`. Returns `0`
for an empty pattern array and when either argument is `NULL`.
+
+This function uses the Hyperscan/VectorScan regular expression engine. Invalid
or unsupported patterns raise an error. A constant input string cannot be
combined with a non-constant pattern-array column; that combination raises an
argument error.
+
+## Example {#example}
+
+```sql
+SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']) AS matched;
+```
+
+```text
+1
+```
+```sql
+SELECT multi_match_any('abc', ['A', 'bcd']) AS matched;
```
-mysql> select multi_match_any('Hello, World!', ['hello', '!', 'world']);
-+-----------------------------------------------------------+
-| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
-+-----------------------------------------------------------+
-| 1 |
-+-----------------------------------------------------------+
-mysql> select multi_match_any('abc', ['A', 'bcd']);
-+--------------------------------------+
-| multi_match_any('abc', ['A', 'bcd']) |
-+--------------------------------------+
-| 0 |
-+--------------------------------------+
+```text
+0
```
-### keywords
- MULTI_MATCH,MATCH,ANY
+
+Regular expressions perform pattern matching rather than literal substring
searches:
+
+```sql
+SELECT multi_match_any('abc123', ['[0-9]+', '^xyz']) AS matched;
+```
+
+```text
+1
+```
+
+```sql
+SELECT multi_match_any('abc', CAST([] AS ARRAY<STRING>)) AS empty_patterns,
+ multi_match_any(CAST(NULL AS STRING), ['a']) AS null_text,
+ multi_match_any('abc', CAST(NULL AS ARRAY<STRING>)) AS null_patterns;
+```
+
+```text
+0 0 0
+```
+
+## keywords
+
+MULTI_MATCH, MATCH, ANY
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
index cdbb850013c..950c6bddd47 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
@@ -2,35 +2,73 @@
{
"title": "MULTI_MATCH_ANY",
"language": "zh-CN",
- "description": "检查字符串 haystack 是否与 re2 语法中的正则表达式 patterns
相匹配。如果都没有匹配的正则表达式返回 0,否则返回 1。"
+ "description": "检查字符串是否匹配正则表达式数组中的任意一个表达式。"
}
---
-## multi_match_any
+<a id="multi_match_any"></a>
+
## 描述
+
+检查 `<haystack>` 是否匹配 `<patterns>` 中的任意一个正则表达式。默认区分大小写。任一参数为 `NULL` 时返回
`0`,不会返回 `NULL`。
+
## 语法
-`TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns)`
+```sql
+MULTI_MATCH_ANY(<haystack>, <patterns>)
+```
+
+## 参数
+
+| 参数 | 描述 |
+| --- | --- |
+| `<haystack>` | 要匹配的字符串,类型为 `STRING`。 |
+| `<patterns>` | 正则表达式数组,类型为 `ARRAY<STRING>`。表达式元素应为非 NULL 字符串。 |
+
+## 返回值
+
+返回 `TINYINT`:任一表达式匹配时为 `1`,否则为 `0`。空表达式数组返回 `0`;任一参数为 `NULL` 时也返回 `0`。
+
+该函数使用 Hyperscan/VectorScan
正则引擎。非法或该引擎不支持的表达式会报错。常量字符串不能与非常量表达式数组列组合;这种组合会返回参数错误。
+
+## 示例 {#举例}
+
+```sql
+SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']) AS matched;
+```
+
+```text
+1
+```
+```sql
+SELECT multi_match_any('abc', ['A', 'bcd']) AS matched;
+```
-检查字符串 `haystack` 是否与 re2 语法中的正则表达式 `patterns` 相匹配。如果都没有匹配的正则表达式返回 0,否则返回 1。
+```text
+0
+```
-## 举例
+正则表达式会执行模式匹配,而不是按字面值查找子串:
+```sql
+SELECT multi_match_any('abc123', ['[0-9]+', '^xyz']) AS matched;
```
-mysql> select multi_match_any('Hello, World!', ['hello', '!', 'world']);
-+-----------------------------------------------------------+
-| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
-+-----------------------------------------------------------+
-| 1 |
-+-----------------------------------------------------------+
-mysql> select multi_match_any('abc', ['A', 'bcd']);
-+--------------------------------------+
-| multi_match_any('abc', ['A', 'bcd']) |
-+--------------------------------------+
-| 0 |
-+--------------------------------------+
+```text
+1
```
-### keywords
- MULTI_MATCH,MATCH,ANY
+
+```sql
+SELECT multi_match_any('abc', CAST([] AS ARRAY<STRING>)) AS empty_patterns,
+ multi_match_any(CAST(NULL AS STRING), ['a']) AS null_text,
+ multi_match_any('abc', CAST(NULL AS ARRAY<STRING>)) AS null_patterns;
+```
+
+```text
+0 0 0
+```
+
+## keywords
+
+MULTI_MATCH, MATCH, ANY
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
index cdbb850013c..950c6bddd47 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
@@ -2,35 +2,73 @@
{
"title": "MULTI_MATCH_ANY",
"language": "zh-CN",
- "description": "检查字符串 haystack 是否与 re2 语法中的正则表达式 patterns
相匹配。如果都没有匹配的正则表达式返回 0,否则返回 1。"
+ "description": "检查字符串是否匹配正则表达式数组中的任意一个表达式。"
}
---
-## multi_match_any
+<a id="multi_match_any"></a>
+
## 描述
+
+检查 `<haystack>` 是否匹配 `<patterns>` 中的任意一个正则表达式。默认区分大小写。任一参数为 `NULL` 时返回
`0`,不会返回 `NULL`。
+
## 语法
-`TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns)`
+```sql
+MULTI_MATCH_ANY(<haystack>, <patterns>)
+```
+
+## 参数
+
+| 参数 | 描述 |
+| --- | --- |
+| `<haystack>` | 要匹配的字符串,类型为 `STRING`。 |
+| `<patterns>` | 正则表达式数组,类型为 `ARRAY<STRING>`。表达式元素应为非 NULL 字符串。 |
+
+## 返回值
+
+返回 `TINYINT`:任一表达式匹配时为 `1`,否则为 `0`。空表达式数组返回 `0`;任一参数为 `NULL` 时也返回 `0`。
+
+该函数使用 Hyperscan/VectorScan
正则引擎。非法或该引擎不支持的表达式会报错。常量字符串不能与非常量表达式数组列组合;这种组合会返回参数错误。
+
+## 示例 {#举例}
+
+```sql
+SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']) AS matched;
+```
+
+```text
+1
+```
+```sql
+SELECT multi_match_any('abc', ['A', 'bcd']) AS matched;
+```
-检查字符串 `haystack` 是否与 re2 语法中的正则表达式 `patterns` 相匹配。如果都没有匹配的正则表达式返回 0,否则返回 1。
+```text
+0
+```
-## 举例
+正则表达式会执行模式匹配,而不是按字面值查找子串:
+```sql
+SELECT multi_match_any('abc123', ['[0-9]+', '^xyz']) AS matched;
```
-mysql> select multi_match_any('Hello, World!', ['hello', '!', 'world']);
-+-----------------------------------------------------------+
-| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
-+-----------------------------------------------------------+
-| 1 |
-+-----------------------------------------------------------+
-mysql> select multi_match_any('abc', ['A', 'bcd']);
-+--------------------------------------+
-| multi_match_any('abc', ['A', 'bcd']) |
-+--------------------------------------+
-| 0 |
-+--------------------------------------+
+```text
+1
```
-### keywords
- MULTI_MATCH,MATCH,ANY
+
+```sql
+SELECT multi_match_any('abc', CAST([] AS ARRAY<STRING>)) AS empty_patterns,
+ multi_match_any(CAST(NULL AS STRING), ['a']) AS null_text,
+ multi_match_any('abc', CAST(NULL AS ARRAY<STRING>)) AS null_patterns;
+```
+
+```text
+0 0 0
+```
+
+## keywords
+
+MULTI_MATCH, MATCH, ANY
diff --git
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
index 5e6b330fca9..7a885e93982 100644
---
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
+++
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/string-functions/multi-match-any.md
@@ -2,35 +2,73 @@
{
"title": "MULTI_MATCH_ANY",
"language": "en",
- "description": "Checks whether the string haystack matches the regular
expressions patterns in re2 syntax."
+ "description": "Checks whether a string matches any regular expression in
an array."
}
---
-## multi_match_any
-### Description
-#### Syntax
+<a id="multi_match_any"></a>
-`TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns)`
+## Description
+Checks whether `<haystack>` matches any regular expression in `<patterns>`.
Matching is case-sensitive by default. Returns `0` rather than `NULL` when
either argument is `NULL`.
-Checks whether the string `haystack` matches the regular expressions
`patterns` in re2 syntax. returns 0 if none of the regular expressions are
matched and 1 if any of the patterns matches.
+## Syntax
-### example
+```sql
+MULTI_MATCH_ANY(<haystack>, <patterns>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| --- | --- |
+| `<haystack>` | Input string, of type `STRING`. |
+| `<patterns>` | Regular expressions, of type `ARRAY<STRING>`. Pattern
elements should be non-NULL strings. |
+
+## Return Value
+
+Returns `TINYINT`: `1` when any expression matches, otherwise `0`. Returns `0`
for an empty pattern array and when either argument is `NULL`.
+
+This function uses the Hyperscan/VectorScan regular expression engine. Invalid
or unsupported patterns raise an error. A constant input string cannot be
combined with a non-constant pattern-array column; that combination raises an
argument error.
+
+## Example {#example}
+
+```sql
+SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']) AS matched;
+```
+
+```text
+1
+```
+```sql
+SELECT multi_match_any('abc', ['A', 'bcd']) AS matched;
```
-mysql> select multi_match_any('Hello, World!', ['hello', '!', 'world']);
-+-----------------------------------------------------------+
-| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
-+-----------------------------------------------------------+
-| 1 |
-+-----------------------------------------------------------+
-mysql> select multi_match_any('abc', ['A', 'bcd']);
-+--------------------------------------+
-| multi_match_any('abc', ['A', 'bcd']) |
-+--------------------------------------+
-| 0 |
-+--------------------------------------+
+```text
+0
```
-### keywords
- MULTI_MATCH,MATCH,ANY
+
+Regular expressions perform pattern matching rather than literal substring
searches:
+
+```sql
+SELECT multi_match_any('abc123', ['[0-9]+', '^xyz']) AS matched;
+```
+
+```text
+1
+```
+
+```sql
+SELECT multi_match_any('abc', CAST([] AS ARRAY<STRING>)) AS empty_patterns,
+ multi_match_any(CAST(NULL AS STRING), ['a']) AS null_text,
+ multi_match_any('abc', CAST(NULL AS ARRAY<STRING>)) AS null_patterns;
+```
+
+```text
+0 0 0
+```
+
+## keywords
+
+MULTI_MATCH, MATCH, ANY
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]