update docs for string functions multi-match-any, multi-search-all-positions, ngram-search and tokenize#1948
Open
xiaokang wants to merge 2 commits intoapache:masterfrom
Open
update docs for string functions multi-match-any, multi-search-all-positions, ngram-search and tokenize#1948xiaokang wants to merge 2 commits intoapache:masterfrom
xiaokang wants to merge 2 commits intoapache:masterfrom
Conversation
multi-search-all-positions, ngram-search and tokenize
multi-search-all-positions, ngram-search and tokenize
morrySnow
reviewed
Feb 6, 2025
|
|
||
| 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. | ||
| ```sql | ||
| TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns) |
Contributor
There was a problem hiding this comment.
- 不用参数类型和返回类型
- 函数名大写
- 参数需要尖括号包裹
Suggested change
| TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns) | |
| MULTI_MATCH_ANY(<haystack>, <patterns>) |
Comment on lines
+41
to
+42
| | `haystack` | The string to be checked | | ||
| | `patterns` | Array of regular expressions | |
Contributor
There was a problem hiding this comment.
Suggested change
| | `haystack` | The string to be checked | | |
| | `patterns` | Array of regular expressions | | |
| | `<haystack>` | The string to be checked | | |
| | `<patterns>` | Array of regular expressions | |
|
|
||
| ## Return Value | ||
|
|
||
| Returns 1 if the string `haystack` matches any of the regular expressions in the `patterns` array, otherwise returns 0. |
Contributor
There was a problem hiding this comment.
Suggested change
| Returns 1 if the string `haystack` matches any of the regular expressions in the `patterns` array, otherwise returns 0. | |
| Returns 1 if the string `<haystack>` matches any of the regular expressions in the `<patterns>` array, otherwise returns 0. |
| ## Examples | ||
|
|
||
| ```sql | ||
| mysql> SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']); |
Contributor
There was a problem hiding this comment.
不要prompt
Suggested change
| mysql> SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']); | |
| SELECT multi_match_any('Hello, World!', ['hello', '!', 'world']); |
Comment on lines
52
to
56
| +-----------------------------------------------------------+ | ||
| | multi_match_any('Hello, World!', ['hello', '!', 'world']) | | ||
| +-----------------------------------------------------------+ | ||
| | 1 | | ||
| +-----------------------------------------------------------+ |
Contributor
There was a problem hiding this comment.
结果和查询分开放到两个 code block 中,结果使用 text 格式
```text
+-----------------------------------------------------------+
| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
+-----------------------------------------------------------+
| 1 |
+-----------------------------------------------------------+
```
f32d932 to
abaa78e
Compare
087102c to
c16141e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Versions
Languages
Docs Checklist