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

docs: fixed indexes, links and translation #2348

Merged
merged 18 commits into from
Aug 16, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@
'myst_parser',
'sphinx_multiversion',
'sphinx_copybutton',
'sphinx.ext.autosectionlabel',
]

autosectionlabel_prefix_document = True
myst_heading_anchors = 6

myst_enable_extensions = [
"amsmath",
"colon_fence",
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/sql/dql/GROUP_BY_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GroupByClause
SELECT select_expr [,select_expr...] FROM ... GROUP BY ...
```

## Boundary Description
## Description

For the standalone version, `GROUP BY` is supported in all conditions. For the cluster version, the execution modes which support this clause are shown below.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/sql/dql/HAVING_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ HavingClause
SELECT select_expr [,select_expr...] FROM ... GROUP BY ... HAVING having_condition
```

## Boundary Description
## Description
For the standalone version, `HAVING` is supported in all conditions. For the cluster version, the execution modes, which support this clause, are shown below

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
Expand Down
4 changes: 2 additions & 2 deletions docs/en/reference/sql/dql/JOIN_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SELECT ... FROM table_ref LAST JOIN table_ref ON expression;

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:-----------------------------------------------------------|--------------|---------------------|---------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| JOIN Clause | **``✓``** | **``✓``** | **``✓``** | The Join clause indicates that the data source comes from multiple joined tables. OpenMLDB currently only supports LAST JOIN. For Online Request Mode, please follow [the specification of LAST JOIN under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servinglast-join) |
| JOIN Clause | **``✓``** | **``✓``** | **``✓``** | The Join clause indicates that the data source comes from multiple joined tables. OpenMLDB currently only supports LAST JOIN. For Online Request Mode, please follow [the specification of LAST JOIN under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#the-usage-specification-of-last-join-under-online-serving) |



Expand Down Expand Up @@ -79,7 +79,7 @@ The following SQL commands created the right table t2 as mentioned above and ins
The storage order of data rows is not necessarily the same as their insert order. And the storage order will influence the matching order when JOIN.
In this example, we want to realize the storage order of t2 as the above figure displayed, which will lead to a result that is convenient to check.
To guarantee the storage order of t2, please create following index, do not set `ts`, and sequentially instert data one by one.
Detail explanation is in [columnindex](https://openmldb.ai/docs/en/main/reference/sql/ddl/CREATE_TABLE_STATEMENT.html#columnindex).
Detail explanation is in [columnindex](../ddl/CREATE_TABLE_STATEMENT.md#columnindex).
```
```sql
>CREATE TABLE t2 (id INT, col1 string,std_ts TIMESTAMP,INDEX(KEY=col1));
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/sql/dql/LIMIT_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LimitClause
SELECT ... LIMIT ...
```

## Boundary Description
## Description
For the standalone version, `LIMIT` is supported in all conditions. For the cluster version, the execution modes, which support this clause, are shown below.

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
Expand Down
4 changes: 2 additions & 2 deletions docs/en/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ SelectExpr ::= ( Identifier '.' ( Identifier '.' )? )? '*'
SELECT const_expr [, const_expr ...];
```

## 2. SELECT Statement Elements
## Description


| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:----------------------------|--------------|---------------------|---------------------|:----------------------------------------------------------------------------------------------------------------------------------------|
| No-table SELECT statement |**``✓``** |**``✓``** | | The no-table SELECT statement computes the constant expression operation list, and the computation does not depend on tables or columns |
| No-table SELECT statement |**``✓``** |**``✓``** | | The no-table SELECT statement computes the constant expression operation list, and the computation does not depend on tables or columns |

#### Examples

Expand Down
24 changes: 12 additions & 12 deletions docs/en/reference/sql/dql/SELECT_STATEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ TableAsName
::= 'AS'? Identifier
```

## SELECT Statement Elements
## SELECT Statement

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:-----------------------------------------------|--------------|---------------------|---------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`SELECT Clause`](#selectexprlist) | **``✓``** | **``✓``** | **``✓``** | A list of projection operations, generally including column names, expressions, or ‘*’ for all columns. |
| `SELECT` Statement and Related Clauses | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:-----------------------------------------------|--------------|---------------------|---------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`SELECT Clause`](#selectexprlist) | **``✓``** | **``✓``** | **``✓``** | A list of projection operations, generally including column names, expressions, or ‘*’ for all columns. |
| [`FROM Clause`](#tablerefs) | **``✓``** | **``✓``** | **``✓``** | The FROM clause indicates the data source.<br />The data source can be one table (`select * from t;`) or multiple tables that LAST JOIN together (see [JOIN CLAUSE](../dql/JOIN_CLAUSE.md)) or no table ( `select 1+1;`), see [NO_TABLE SELECT](../dql/NO_TABLE_SELECT_CLAUSE.md) |
| [`JOIN` Clause](../dql/JOIN_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | The JOIN clause indicates that the data source comes from multiple joined tables. OpenMLDB currently only supports LAST JOIN. For Online Request Mode, please follow [the specification of LAST JOIN under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servinglast-join) |
| [`WHERE` Clause](../dql/WHERE_CLAUSE.md) | **``✓``** | **``✓``** | | The WHERE clause is used to set filter conditions, and only the data that meets the conditions will be included in the query result. |
| [`GROUP BY` Clause](../dql/GROUP_BY_CLAUSE.md) | **``✓``** | | | The GROUP BY clause is used to group the query results.The grouping conditions only support simple columns. |
| [`HAVING` Clause](../dql/HAVING_CLAUSE.md) | **``✓``** | | | The HAVING clause is similar to the WHERE clause. The HAVING clause filters data after GROUP BY, and the WHERE clause is used to filter records before aggregation. | |
| [`WINDOW` Clause](../dql/WINDOW_CLAUSE.md) | **``✓``** | | **``✓``** | The WINDOW clause is used to define one or several windows. Windows can be named or anonymous. Users can call aggregate functions on the window to perform analysis (```sql agg_func() over window_name```). For Online Request Mode, please follow the [specification of WINDOW Clause under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servingwindow) |
| [`LIMIT` Clause](../dql/LIMIT_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | The LIMIT clause is used to limit the number of results. OpenMLDB currently only supports one parameter to limit the maximum number of rows of returned data. |
| `ORDER BY` Clause | | | | Standard SQL also supports the ORDER BY clause, however OpenMLDB does not support this clause currently. For example, the query `SELECT * from t1 ORDER BY col1;` is not supported in OpenMLDB. |
| [`JOIN` Clause](../dql/JOIN_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | The JOIN clause indicates that the data source comes from multiple joined tables. OpenMLDB currently only supports LAST JOIN. For Online Request Mode, please follow [the specification of LAST JOIN under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#the-usage-specification-of-last-join-under-online-serving) |
| [`WHERE` Clause](../dql/WHERE_CLAUSE.md) | **``✓``** | **``✓``** | | The WHERE clause is used to set filter conditions, and only the data that meets the conditions will be included in the query result. |
| [`GROUP BY` Clause](../dql/GROUP_BY_CLAUSE.md) | **``✓``** | | | The GROUP BY clause is used to group the query results.The grouping conditions only support simple columns. |
| [`HAVING` Clause](../dql/HAVING_CLAUSE.md) | **``✓``** | | | The HAVING clause is similar to the WHERE clause. The HAVING clause filters data after GROUP BY, and the WHERE clause is used to filter records before aggregation. | |
| [`WINDOW` Clause](../dql/WINDOW_CLAUSE.md) | **``✓``** | | **``✓``** | The WINDOW clause is used to define one or several windows. Windows can be named or anonymous. Users can call aggregate functions on the window to perform analysis (```sql agg_func() over window_name```). For Online Request Mode, please follow the [specification of WINDOW Clause under Online Request Mode](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#window-usage-specification-under-online-serving) |
| [`LIMIT` Clause](../dql/LIMIT_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | The LIMIT clause is used to limit the number of results. OpenMLDB currently only supports one parameter to limit the maximum number of rows of returned data. |
| `ORDER BY` Clause | | | | Standard SQL also supports the ORDER BY keyword, however OpenMLDB does not support this keyword currently. For example, the query `SELECT * from t1 ORDER BY col1;` is not supported in OpenMLDB. |

```{warning}
The `SELECT` running in online mode or the stand-alone version may not obtain complete data.
Because a query may perform a large number of scans on multiple tablets, for stability, the largest number of bytes to scan is limited, namely `scan_max_bytes_size`.

If the select results are truncated, the message of `reach the max byte ...` will be recorded in the tablet's log, but there will be no error.
```
```
2 changes: 1 addition & 1 deletion docs/en/reference/sql/dql/WINDOW_CLAUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SELECT select_expr [,select_expr...], window_function_name(expr) OVER window_nam

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:-------------------------------------------------------|--------------|---------------------|---------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| WINDOW Clause | **``✓``** | | **``✓``** | The window clause is used to define one or several windows. Windows can be named or anonymous. Users can call aggregate functions on the window to perform analysis (```sql agg_func() over window_name```). For Online Request Mode, please follow the [specification of WINDOW Clause under Online Request](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servingwindow) |
| WINDOW Clause | **``✓``** | | **``✓``** | The window clause is used to define one or several windows. Windows can be named or anonymous. Users can call aggregate functions on the window to perform analysis (```sql agg_func() over window_name```). For Online Request Mode, please follow the [specification of WINDOW Clause under Online Request](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#window-usage-specification-under-online-serving) |

## Basic WINDOW SPEC Syntax Elements

Expand Down
6 changes: 5 additions & 1 deletion docs/zh/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@
'myst_parser',
'sphinx_multiversion',
'sphinx_copybutton',
'sphinx.ext.autosectionlabel',
]

autosectionlabel_prefix_document = True

myst_heading_anchors = 6

myst_enable_extensions = [
"amsmath",
"colon_fence",
Expand All @@ -53,7 +58,6 @@
"tasklist",
]

myst_heading_anchors = 3

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
Loading