-
Notifications
You must be signed in to change notification settings - Fork 261
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
[opt](reference) update some json and string function docs #1891
base: master
Are you sure you want to change the base?
Conversation
…oris-website into shenxiaohu-jira_new
…oris-website into shenxiaohu-jira_new
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.
只评论了dev 英文版。其他版本也对应修改一下
docs/sql-manual/sql-functions/scalar-functions/json-functions/get-json-double.md
Outdated
Show resolved
Hide resolved
docs/sql-manual/sql-functions/scalar-functions/json-functions/get-json-string.md
Outdated
Show resolved
Hide resolved
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-contains.md
Outdated
Show resolved
Hide resolved
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-contains.md
Outdated
Show resolved
Hide resolved
|
||
```sql | ||
|
||
SET @j = '{"a": 1, "b": 2, "c": {"d": 4}}'; |
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 | ||
STRING json_type(JSON j, VARCHAR json_path) | ||
STRING JSON_TYPE( <JSON j> ) |
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.
STRING JSON_TYPE( <JSON j> ) | |
STRING JSON_TYPE( <json> ) |
|
||
```sql | ||
STRING json_type(JSON j, VARCHAR json_path) |
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.
json_path 被去掉了,是其实不支持?
|
||
| Parameter | Description | | ||
|------|------| | ||
| `<JSON j>` | The JSON string to check the type of. | |
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.
| `<JSON j>` | The JSON string to check the type of. | | |
| `<json>` | The JSON string to check the type of. | |
|
||
`JSONB json_valid(VARCHAR json_str)` | ||
```sql | ||
JSONB JSON_VALID( <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.
JSONB JSON_VALID( <str> ) | |
JSON_VALID( <str> ) |
|
||
- upper |
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.
- upper | |
- UPPER |
…oris-website into shenxiaohu-jira_new
@@ -30,7 +30,9 @@ under the License. | |||
|
|||
## 语法 | |||
|
|||
`JSON_LENGTH(JSON <json_str>, <json_path>)` | |||
```sql | |||
JSON_LENGTH(JSON <json_str> [ , <json_path>]) |
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.
- 参数不要带类型
JSON_LENGTH(JSON <json_str> [ , <json_path>]) | |
JSON_LENGTH(<json_str> [ , <json_path>]) |
@@ -43,7 +43,7 @@ under the License. | |||
## 语法 | |||
|
|||
```sql | |||
STRING JSON_TYPE( <JSON j> ) | |||
STRING JSON_TYPE( <JSON> ) |
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.
- 参数用小写
STRING JSON_TYPE( <JSON> ) | |
STRING JSON_TYPE( <json> ) |
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 中,查询使用 sql 格式,结果使用 text 格式
```sql | ||
ALTER STORAGE POLICY 'policy_name' | ||
PROPERTIES ("key"="value", ...); | ||
ALTER STORAGE POLICY 'policy_name' PROPERTIES ("key"="value", ...); |
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.
- 参数需要尖括号包裹
- 变长参数部分,应该用方括号包裹
ALTER STORAGE POLICY 'policy_name' PROPERTIES ("key"="value", ...); | |
ALTER STORAGE POLICY "<policy_name>" PROPERTIES ("<key>"="<value>" [, ... ]); |
```sql | ||
ALTER STORAGE POLICY 'policy_name' | ||
PROPERTIES ("key"="value", ...); | ||
ALTER STORAGE POLICY 'policy_name' PROPERTIES ("key"="value", ...); | ||
``` | ||
|
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.
缺少参数描述部分
## 描述 | ||
|
||
该命令用于创建存储库。本文档的主题描述了创建 Doris 自管理存储库的语法。 | ||
|
||
|
||
## 语法 | ||
|
||
```sql | ||
CREATE STORAGE VAULT [IF NOT EXISTS] vault | ||
[properties] |
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.
[properties] | |
[ <properties> ] |
```sql | ||
CREATE STORAGE VAULT [IF NOT EXISTS] vault | ||
[properties] | ||
``` | ||
|
||
#### properties | ||
## 参数 | ||
|
||
| 参数 | 是否必需 | 描述 | | ||
|:-------|:-----|:-----------------------| |
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.
这是参数 properties 的 key 的可选范围。
参数需要先写 <properties>
,介绍 properties 的用处。
然后再介绍 properties 时,再用另外一个表格介绍 properties 的 key 都的可选范围。
@@ -34,8 +34,7 @@ under the License. | |||
SET vault_name DEFAULT STORAGE VAULT |
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.
SET vault_name DEFAULT STORAGE VAULT | |
SET <vault_name> DEFAULT STORAGE VAULT |
@@ -36,26 +36,20 @@ under the License. | |||
|
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.
语法中的参数需要尖括号包裹
SHOW CACHE HOTSPOT '/[<compute_group_name>/<table_name>]';
| compute_group_name | 计算组的名称。 | | ||
| table_name | 表的名称。 | |
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.
| compute_group_name | 计算组的名称。 | | |
| table_name | 表的名称。 | | |
| <compute_group_name> | 计算组的名称。 | | |
| <table_name> | 表的名称。 | |
@@ -30,7 +30,7 @@ under the License. | |||
|
|||
查看所有/指定存储策略关联的表和分区 | |||
|
|||
语法: | |||
## 语法 | |||
|
|||
```sql | |||
SHOW STORAGE POLICY USING [FOR some_policy] |
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.
SHOW STORAGE POLICY USING [FOR some_policy] | |
SHOW STORAGE POLICY USING [FOR <some_policy>] |
@@ -30,7 +30,7 @@ under the License. | |||
|
|||
查看所有/指定存储策略关联的表和分区 | |||
|
|||
语法: | |||
## 语法 | |||
|
|||
```sql | |||
SHOW STORAGE POLICY USING [FOR some_policy] |
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.
缺少参数章节
@@ -40,7 +40,7 @@ SHOW STORAGE POLICY USING [FOR some_policy] | |||
|
|||
1. 查看所有启用了存储策略的对象 | |||
```sql | |||
mysql> show storage policy using; | |||
show storage policy using; |
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 中
Versions
Languages
Docs Checklist