-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string-function changes #1841
string-function changes #1841
Conversation
http://39.106.86.136:8090/browse/DORIS-18163 string-function changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
都是一些共性问题,每个评论了一个,麻烦所有函数文档都改一下吧
@@ -25,17 +25,19 @@ under the License. | |||
--> | |||
|
|||
|
|||
## trim-in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉这行
## 描述 | ||
|
||
删除输入字符串两端的多余空格 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
描述有些问题,当存在第二个参数时,不是删除空格
## 语法 | ||
|
||
`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` | ||
|
||
## 注意事项 | ||
|
||
当没有 `rhs` 参数时,将参数 `str` 中右侧和左侧开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的两端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句话直接写到描述里面。去掉注意事项章节
## 描述 | ||
|
||
删除输入字符串两端的多余空格 | ||
## 语法 | ||
|
||
`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法中不要有类型,参数需要尖括号包裹。使用code block 而不是 inline code。函数名使用大写
`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` | |
```sql | |
TRIM_IN( <str> [, <rhs> ] ) | |
``` |
|
||
当没有 `rhs` 参数时,将参数 `str` 中右侧和左侧开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的两端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) | ||
|
||
|
||
## 举例 | ||
## 示例 | ||
|
||
```sql | ||
mysql> SELECT trim_in(' ab d ') str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉prompt
mysql> SELECT trim_in(' ab d ') str; | |
SELECT trim_in(' ab d ') str; |
mysql> SELECT trim_in('ababccaab','ab') str; | ||
+------+ | ||
| str | | ||
+------+ | ||
| cc | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个例子需要保留
+------------------------------------------------+ | ||
## 返回值 | ||
```sql | ||
Doris+Q%26A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
返回值使用mysql结果的table形式呈现
+------------------------------------------------+ | ||
| https://doris.apache.org/zh-CN/docs/sql-manual/sql-functions/string-functions | | ||
+------------------------------------------------+ | ||
## 返回值 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
返回值章节不是写示例的返回值,而是写函数返回值的含义。应出现在示例上方
duplicates with #1851 |
Versions
Languages
Docs Checklist