Skip to content
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_dev #1851

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

cool-joker
Copy link

@cool-joker cool-joker commented Jan 17, 2025

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

Copy link
Contributor

@morrySnow morrySnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 问题较多,请仔细看参考文档中函数部分的示例。
  2. 共性问题评论到了第一篇文档上,麻烦把后续的文档也一并修改吧


```sql
trim( str [, VARCHAR rhs])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 函数名大写
  2. 不需要参数类型
  3. 参数需要用尖括号包裹
Suggested change
trim( str [, VARCHAR rhs])
TRIM( <str> [, <rhs> ])

```sql
trim( str [, VARCHAR rhs])
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缺少参数和返回值章节

### keywords
UCASE
```sql
mysql> SELECT ucase("aBc123");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用能 prompt

Suggested change
mysql> SELECT ucase("aBc123");
SELECT ucase("aBc123");

## 描述

将URL转换为解码字符串。

## 语法

```sql
VARCHAR url_decode(VARCHAR url)
URL_DECODE(' STRING ')
```

### Parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文文档的章节名需要用中文

URL_ENCODE(' STRING ')
```

## 必选参数
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 必选参数
## 参数


## 必选参数

- STRING: 待编码的字符串。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数需要时表格形式

## 示例

```sql
mysql> select URL_ENCODE('Doris Q&A');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

结果和查询要分成两个code block

@cool-joker cool-joker requested a review from morrySnow January 17, 2025 14:41
Copy link
Contributor

@morrySnow morrySnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就一个问题,参数章节里面的参数列,也需要带上尖括号

@morrySnow morrySnow mentioned this pull request Jan 17, 2025
6 tasks
Copy link
Contributor

@morrySnow morrySnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文文档语法部分都有类似的问题,评论了一个,其他的也修改一下吧


When the 'rhs' parameter is not present, remove the continuous spaces that appear from the starting and ending of the 'str' parameter. Otherwise, remove 'rhs'.
```sql
RTIM( <str> [ , <rhs>])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RTIM( <str> [ , <rhs>])
TRIM( <str> [ , <rhs>])

select URL_ENCODE('Doris Q&A');
```

```sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```sql
```text

## 语法

`DOUBLE get_json_double(VARCHAR json_str, VARCHAR json_path)`
`DOUBLE GET_JSON_DOUBLE( <json_str>, <json_path>)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 要用 code block 不要用 inline code
  2. 不要返回类型
Suggested change
`DOUBLE GET_JSON_DOUBLE( <json_str>, <json_path>)`
```sql
GET_JSON_DOUBLE( <json_str>, <json_path>)
```


When the 'rhs' parameter is not present, remove the continuous spaces that appear from the starting and ending of the 'str' parameter. Otherwise, remove 'rhs'.
```sql
RTIM( <str> [ , <rhs>])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RTIM( <str> [ , <rhs>])
TRIM( <str> [ , <rhs>])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants