-
Notifications
You must be signed in to change notification settings - Fork 266
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
[Enhancement](docs) Sql function compress and uncompress #1955
base: master
Are you sure you want to change the base?
Conversation
|
||
## Parameters | ||
|
||
| 参数 | 说明 | |
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 shouldn't be Chinese character in English docs
select compress('abc'); | ||
``` | ||
```text | ||
+----------------------------------+ |
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.
please add case about empty string input
## Syntax | ||
|
||
```sql | ||
SELECT(<uncompressed>, <compressed>) |
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.
seems it's wrong? should be COMPRESS(<uncompressed_str>)?
## Syntax | ||
|
||
```sql | ||
UNCOMPRESS(<compressed>, <uncompressed>) |
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.
wrong, uncompress only accept one arg
select uncompress(compress('abc')); | ||
``` | ||
```text | ||
+-----------------------------+ |
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.
add more cases which got NULL, or empty
cd7da31
to
3fad78c
Compare
| 0x03000000789C4B4C4A0600024D0127 | | ||
+----------------------------------+ | ||
``` | ||
``` |
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.
add sql
here, and remove mysql>
``` | ||
mysql> select compress(''); | ||
``` | ||
``` |
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.
add text
here
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.
LGTM
``` sql | ||
select compress('abc'); | ||
``` | ||
The result of the decompression is unreadable and you don't need to care about its true 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.
dont comment like this. add a example like uncompress(compress())
0025aad
to
54fef7a
Compare
## 语法 | ||
|
||
```sql | ||
COMPRESS(<uncompresse_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.
这里有个拼写错误
|
||
## 返回值 | ||
返回串与输入的 <uncompressed_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.
尽量不要出现第一、第二人称
|--------------------|---------------| | ||
| `<uncompressed_str>` | 未压缩的原串 | | ||
|
||
参数类型是varchar或者string |
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.
LGTM
|
||
|
||
## Instructions | ||
The parameter type is varchar or string |
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.
- 这一行移动到 Parameters 的 Description 里
- 这一章节改名 Return Value
## Instructions | ||
The parameter type is varchar or string | ||
|
||
The return string is of the same type as the input <uncompressed_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.
The return string is of the same type as the input <uncompressed_str> | |
The return string is of the same type as the input `<uncompressed_str>` |
|
||
The return string is an unreadable compressed byte stream. | ||
Special cases: | ||
- <uncompressed_str> Return '' when the input is '' |
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.
- <uncompressed_str> Return '' when the input is '' | |
- `<uncompressed_str>` Return empty string(`''`) when the input is empty string(`''`) |
| `<compressed_str>` | Compressed binary data | | ||
|
||
|
||
## Instructions |
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.
和 compress 类似
| `<uncompressed_str>` | Uncompressed raw string | | ||
|
||
The parameter type is varchar or string |
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.
| `<uncompressed_str>` | Uncompressed raw string | | |
The parameter type is varchar or string | |
| `<uncompressed_str>` | Uncompressed raw string, parameter type is varchar or string | |
2649121
to
16dc471
Compare
Versions
Languages
Docs Checklist