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

[fix](help-doc) fix format of all sql-manual doc #9306

Merged
merged 6 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions docs/.vuepress/sidebar/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ module.exports = [
},
{
title: "Encryption Functions",
directoryPath: "encrypt-dixgest-functions/",
directoryPath: "encrypt-digest-functions/",
initialOpenGroupIndex: -1,
children: [
"aes",
Expand All @@ -524,7 +524,6 @@ module.exports = [
"outer-combinator"
],
},
"window-function",
"cast",
"digital-masking",
],
Expand Down
3 changes: 1 addition & 2 deletions docs/.vuepress/sidebar/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ module.exports = [
},
{
title: "加密和信息摘要函数",
directoryPath: "encrypt-dixgest-functions/",
directoryPath: "encrypt-digest-functions/",
initialOpenGroupIndex: -1,
children: [
"aes",
Expand All @@ -524,7 +524,6 @@ module.exports = [
"outer-combinator"
],
},
"window-function",
"cast",
"digital-masking",
],
Expand Down
4 changes: 2 additions & 2 deletions docs/en/get-starting/get-starting.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Doris uses the MySQL protocol for communication, and users can connect to the Do

By default, Http protocol is used for WebUI access, and the following format address is entered in the browser to access

```cql
```
http://FE_IP:FE_HTTP_PORT(默认8030)
```

Expand Down Expand Up @@ -688,4 +688,4 @@ The current UPDATE statement **only supports** row updates on the Unique model,

```sql
DELETE FROM my_table PARTITIONS (p1, p2) WHERE k1 >= 3 AND k2 = "abc";
````
````
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ specific language governing permissions and limitations
under the License.
-->

# APPROX_COUNT_DISTINCT
## Description
### Syntax
## APPROX_COUNT_DISTINCT
### Description
#### Syntax

`APPROX_COUNT_DISTINCT (expr)`

Expand All @@ -35,7 +35,7 @@ Returns an approximate aggregation function similar to the result of COUNT (DIST

It combines COUNT and DISTINCT faster and uses fixed-size memory, so less memory can be used for columns with high cardinality.

## example
### example
```
MySQL > select approx_count_distinct(query_id) from log_statis group by datetime;
+-----------------+
Expand All @@ -44,6 +44,6 @@ MySQL > select approx_count_distinct(query_id) from log_statis group by datetime
| 17721 |
+-----------------+
```
## keyword
### keywords

APPROX_COUNT_DISTINCT
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/avg.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ under the License.
-->


#AVG
## Description
### Syntax
## AVG
### Description
#### Syntax

`AVG([DISTINCT] expr)`

Expand All @@ -36,7 +36,7 @@ Used to return the average value of the selected field

Optional field DISTINCT parameters can be used to return the weighted average

## example
### example

```
mysql> SELECT datetime, AVG(cost_time) FROM log_statis group by datetime;
Expand All @@ -54,6 +54,6 @@ mysql> SELECT datetime, AVG(distinct cost_time) FROM log_statis group by datetim
+---------------------+---------------------------+

```
## keyword
### keywords

AVG
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ under the License.
-->


# BITMAP_UNION
## BITMAP_UNION

## Create table
### description

### example

#### Create table

The aggregation model needs to be used when creating the table. The data type is bitmap and the aggregation function is bitmap_union.
```
Expand All @@ -47,15 +51,15 @@ Note: When the amount of data is large, it is best to create a corresponding rol
ALTER TABLE pv_bitmap ADD ROLLUP pv (page, user_id);
```

## Data Load
#### Data Load

`TO_BITMAP (expr)`: Convert 0 ~ 18446744073709551615 unsigned bigint to bitmap

`BITMAP_EMPTY ()`: Generate empty bitmap columns, used for insert or import to fill the default value

`BITMAP_HASH (expr)`: Convert any type of column to a bitmap by hashing

### Stream Load
##### Stream Load

```
cat data | curl --location-trusted -u user: passwd -T--H "columns: dt, page, user_id, user_id = to_bitmap (user_id)" http: // host: 8410 / api / test / testDb / _stream_load
Expand All @@ -69,7 +73,7 @@ cat data | curl --location-trusted -u user: passwd -T--H "columns: dt, page, use
cat data | curl --location-trusted -u user: passwd -T--H "columns: dt, page, user_id, user_id = bitmap_empty ()" http: // host: 8410 / api / test / testDb / _stream_load
```

### Insert Into
##### Insert Into

id2's column type is bitmap
```
Expand Down Expand Up @@ -97,9 +101,9 @@ insert into bitmap_table1 select id, bitmap_hash (id_string) from table;
```


## Data Query
#### Data Query

### Syntax
##### Syntax


`BITMAP_UNION (expr)`: Calculate the union of two Bitmaps. The return value is the new Bitmap value.
Expand All @@ -112,7 +116,7 @@ insert into bitmap_table1 select id, bitmap_hash (id_string) from table;
filter_column The cardinality of the intersection of multiple bitmaps of the filter.
bitmap_column_to_count is a column of type bitmap, filter_column is a column of varying dimensions, and filter_values ​​is a list of dimension values.

### Example
##### Example

The following SQL uses the pv_bitmap table above as an example:

Expand Down Expand Up @@ -140,7 +144,6 @@ from pv_bitmap
where page in ('meituan', 'waimai');
```


## keyword
### keywords

BITMAP, BITMAP_COUNT, BITMAP_EMPTY, BITMAP_UNION, BITMAP_UNION_INT, TO_BITMAP, BITMAP_UNION_COUNT, INTERSECT_COUNT
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/count.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# COUNT
## Description
### Syntax
## COUNT
### Description
#### Syntax

`COUNT([DISTINCT] expr)`


Number of rows used to return the required rows

## example
### example

```
MySQL > select count(*) from log_statis group by datetime;
Expand All @@ -57,5 +57,5 @@ MySQL > select count(distinct datetime) from log_statis group by datetime;
| 71045 |
+-------------------------------+
```
## keyword
### keywords
COUNT
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# group_concat
## description
### Syntax
## group_concat
### description
#### Syntax

`VARCHAR GROUP_CONCAT(VARCHAR str[, VARCHAR sep])`


This function is an aggregation function similar to sum (), and group_concat links multiple rows of results in the result set to a string. The second parameter, sep, is a connection symbol between strings, which can be omitted. This function usually needs to be used with group by statements.

## example
### example

```
mysql> select value from test;
Expand Down Expand Up @@ -66,5 +66,5 @@ mysql> select GROUP_CONCAT(value, NULL) from test;
| NULL |
+----------------------------+
```
## keyword
### keywords
GROUP_CONCAT,GROUP,CONCAT
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ specific language governing permissions and limitations
under the License.
-->

# HLL_UNION_AGG
## description
### Syntax
## HLL_UNION_AGG
### description
#### Syntax

`HLL_UNION_AGG(hll)`

Expand All @@ -39,7 +39,7 @@ Based on this, we get an estimate with an error of about 1%. The HLL column is g

When importing, hll_hash function is used to specify which column in data is used to generate HLL column. It is often used to replace count distinct, and to calculate UV quickly in business by combining rollup.

## example
### example
```
MySQL > select HLL_UNION_AGG(uv_set) from test_uv;;
+-------------------------+
Expand All @@ -48,5 +48,5 @@ THE COURT OF JUSTICE OF THE EUROPEAN COMMUNITIES,
| 17721 |
+-------------------------+
```
## keyword
### keywords
HLL_UNION_AGG,HLL,UNION,AGG
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/max.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# MAX
## description
### Syntax
## MAX
### description
#### Syntax

`MAX(expr)`


Returns the maximum value of an expr expression

## example
### example
```
MySQL > select max(scan_rows) from log_statis group by datetime;
+------------------+
Expand All @@ -42,5 +42,5 @@ MySQL > select max(scan_rows) from log_statis group by datetime;
| 4671587 |
+------------------+
```
## keyword
### keywords
MAX
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/max_by.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# MAX_BY
## description
### Syntax
## MAX_BY
### description
#### Syntax

`MAX_BY(expr1, expr2)`


Returns the value of an expr1 associated with the maximum value of expr2 in a group.

## example
### example
```
MySQL > select * from tbl;
+------+------+------+------+
Expand All @@ -52,5 +52,5 @@ MySQL > select max_by(k1, k4) from tbl;
| 0 |
+--------------------+
```
## keyword
### keywords
MAX_BY
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/min.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# MIN
## Description
### Syntax
## MIN
### Description
#### Syntax

`MIN(expr)`


Returns the minimum value of an expr expression

## example
### example
```
MySQL > select min(scan_rows) from log_statis group by datetime;
+------------------+
Expand All @@ -42,5 +42,5 @@ MySQL > select min(scan_rows) from log_statis group by datetime;
| 0 |
+------------------+
```
## keyword
### keywords
MIN
10 changes: 5 additions & 5 deletions docs/en/sql-manual/sql-functions/aggregate-functions/min_by.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ specific language governing permissions and limitations
under the License.
-->

# MIN_BY
## description
### Syntax
## MIN_BY
### description
#### Syntax

`MIN_BY(expr1, expr2)`


Returns the value of an expr1 associated with the minimum value of expr2 in a group.

## example
### example
```
MySQL > select * from tbl;
+------+------+------+------+
Expand All @@ -52,5 +52,5 @@ MySQL > select min_by(k1, k4) from tbl;
| 4 |
+--------------------+
```
## keyword
### keywords
MIN_BY
Loading