Re: [PR] [doc](function)support regexp_count function [doris-website]

2025-07-01 Thread via GitHub


zclllyybb merged PR #2475:
URL: https://github.com/apache/doris-website/pull/2475


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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



Re: [PR] [doc](function)support regexp_count function [doris-website]

2025-06-30 Thread via GitHub


zclllyybb commented on code in PR #2475:
URL: https://github.com/apache/doris-website/pull/2475#discussion_r2176292043


##
i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/regexp-count.md:
##
@@ -0,0 +1,219 @@
+---
+{
+"title": "REGEXP_COUNT",
+"language": "zh-CN"
+}
+
+---
+
+
+## 描述
+这是一个用于统计字符串中匹配给定正则表达式模式的字符数量的函数。输入包括用户提供的字符串和正则表达式模式。返回值为匹配字符的总数量;如果未找到匹配项,则返回 
0。
+
+1. 'str' 参数为 “string” 类型,是用户希望通过正则表达式进行匹配的字符串。
+
+2. 'pattern' 参数为 “string” 类型,是用于匹配字符串的正则表达式模式字符串。
+
+3. 返回值为 “int” 类型,表示成功匹配的字符数量。
+
+
+
+## 语法
+
+```sql
+REGEXP_COUNT(, )
+```
+
+## 参数
+
+| 参数 | 描述 |
+| --   | --  |
+| `` | 该参数为 “string” 类型,是通过正则表达式匹配得到的目标值。

Review Comment:
   这个表格格式不对,缺边栏了。可以用vscode的md渲染先判断一下格式是否有问题。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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



Re: [PR] [doc](function)support regexp_count function [doris-website]

2025-06-30 Thread via GitHub


yiguolei commented on code in PR #2475:
URL: https://github.com/apache/doris-website/pull/2475#discussion_r2174743914


##
i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/regexp-count.md:
##
@@ -0,0 +1,175 @@
+---
+{
+"title": "REGEXP_COUNT",
+"language": "zh-CN"
+}
+
+---
+
+
+## 描述
+这是一个用于统计字符串中匹配给定正则表达式模式的字符数量的函数。输入包括用户提供的字符串和正则表达式模式。返回值为匹配字符的总数量;如果未找到匹配项,则返回 
0。
+
+1. 'str' 参数为 “string” 类型,是用户希望通过正则表达式进行匹配的字符串。
+
+2. 'pattern' 参数为 “string” 类型,是用于匹配字符串的正则表达式模式字符串。
+
+3. 返回值为 “int” 类型,表示成功匹配的字符数量。
+
+
+
+## 语法
+
+```sql
+REGEXP_COUNT(, )
+```
+
+## 参数
+
+| 参数 | 描述 |
+| --   | --  |
+| `` | 该参数为 “string” 类型,是通过正则表达式匹配得到的目标值。
+| `` |该参数为 “string” 类型,是一个正则表达式,用于匹配符合该模式规则的字符串。
+
+## 返回值
+
+- 返回正则表达式 “pattern” 在字符串 “str” 中的匹配字符数量,返回类型为 “int”。若没有字符匹配,则返回 0。

Review Comment:
   如果明确了行为之后,得把这两个行为补充到测试case 章节



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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



Re: [PR] [doc](function)support regexp_count function [doris-website]

2025-06-30 Thread via GitHub


yiguolei commented on code in PR #2475:
URL: https://github.com/apache/doris-website/pull/2475#discussion_r2174743003


##
i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/string-functions/regexp-count.md:
##
@@ -0,0 +1,175 @@
+---
+{
+"title": "REGEXP_COUNT",
+"language": "zh-CN"
+}
+
+---
+
+
+## 描述
+这是一个用于统计字符串中匹配给定正则表达式模式的字符数量的函数。输入包括用户提供的字符串和正则表达式模式。返回值为匹配字符的总数量;如果未找到匹配项,则返回 
0。
+
+1. 'str' 参数为 “string” 类型,是用户希望通过正则表达式进行匹配的字符串。
+
+2. 'pattern' 参数为 “string” 类型,是用于匹配字符串的正则表达式模式字符串。
+
+3. 返回值为 “int” 类型,表示成功匹配的字符数量。
+
+
+
+## 语法
+
+```sql
+REGEXP_COUNT(, )
+```
+
+## 参数
+
+| 参数 | 描述 |
+| --   | --  |
+| `` | 该参数为 “string” 类型,是通过正则表达式匹配得到的目标值。
+| `` |该参数为 “string” 类型,是一个正则表达式,用于匹配符合该模式规则的字符串。
+
+## 返回值
+
+- 返回正则表达式 “pattern” 在字符串 “str” 中的匹配字符数量,返回类型为 “int”。若没有字符匹配,则返回 0。

Review Comment:
   如果 str 或者pattern 为null的时候,结果是啥?
   如果 pattern 不符合正则表达式的规则定义返回是啥?
   参考 
https://docs.databricks.com/aws/en/sql/language-manual/functions/regexp_count 
的定义



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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



[PR] [doc](function)support regexp_count function [doris-website]

2025-06-13 Thread via GitHub


dwdwqfwe opened a new pull request, #2475:
URL: https://github.com/apache/doris-website/pull/2475

   ## Versions 
   
   - [ ] dev
   - [ ] 3.0
   - [ ] 2.1
   - [ ] 2.0
   
   ## Languages
   
   - [ ] Chinese
   - [ ] English
   
   ## Docs Checklist
   
   - [ ] Checked by AI
   - [ ] Test Cases Built
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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