Skip to content

Commit

Permalink
docs: 更新 ONLINE REUQEST MODE 说明 (#3703)
Browse files Browse the repository at this point in the history
  • Loading branch information
aceforeverd authored Feb 28, 2024
1 parent cdaf311 commit 26f80b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ The following table shows the `SELECT` clause supported under online request mod

| SELECT Clause | Note |
|:------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Simple calculation on single table | The so-called simple single-table query is to process the column of a table, or use operation expressions, single-row processing function (Scalar Function) and their combined expressions on the table. You need to follow the [specifications of Single-table query under Online Request mode](#specifications-of-single-table-query-under-online-request-mode) |
| Simple query on single table | The so-called simple single-table query is to process the column of a table, or use operation expressions, single-row processing function (Scalar Function) and their combined expressions on the table. You need to follow the [specifications of Single-table query under Online Request mode](#specifications-of-simple-single-table-query-under-online-request-mode) |
| [`JOIN` Clause](../dql/JOIN_CLAUSE.md) | OpenMLDB currently only supports **LAST JOIN**. For Online Request mode, please follow [the specifications of LAST JOIN under Online Request mode](#specifications-of-last-join-under-online-request-mode) |
| [`WINDOW` Clause](../dql/WINDOW_CLAUSE.md) | The window clause is used to define one or several windows. Windows can be named or anonymous. Aggregate functions can be called on the window to perform some analytical computations. For Online Request mode, please follow the [specifications of WINDOW under Online Request mode](#specifications-of-window-under-online-request-mode) |
| [`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. |

## Specifications of `SELECT` Clause Supported by Online Request Mode

### Specifications of Single-table Query under Online Request Mode
### Specifications of simple single-table query under Online Request Mode

- Only column computations, expressions, and single-row processing functions (Scalar Function) and their combined expressions are supported.
- Single table query does not contain [GROUP BY clause](../dql/JOIN_CLAUSE.md), [WHERE clause](../dql/WHERE_CLAUSE.md), [HAVING clause](../dql/HAVING_CLAUSE.md) and [WINDOW clause](../dql/WINDOW_CLAUSE.md).
- Single table query only involves the computation of a single table, and does not include the computation of [joined](../dql/JOIN_CLAUSE.md) multiple tables.
- Only two part from syntax perspective: `select_list` and `from table`. It does not contain [GROUP BY clause](../dql/JOIN_CLAUSE.md), [WHERE clause](../dql/WHERE_CLAUSE.md), [HAVING clause](../dql/HAVING_CLAUSE.md) and [WINDOW clause](../dql/WINDOW_CLAUSE.md).
- Only involves the computation of one table, and does not include the computation of [joined](../dql/JOIN_CLAUSE.md) multiple tables.

**Example**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ OpenMLDB仅支持上线[SELECT查询语句](../dql/SELECT_STATEMENT.md)。

| SELECT 子句 | 说明 |
| :--------------------------------------- | :----------------------------------------------------------- |
| 单张表的简单表达式计算 | 简单的单表查询是对一张表进行列运算、使用运算表达式或单行处理函数(Scalar Function)以及它们的组合表达式作计算。需要遵循[在线请求模式下单表查询的使用规范](#在线请求模式下单表查询的使用规范) |
| 单张表的简单查询 | 简单的单表查询是对一张表进行列运算、使用运算表达式或单行处理函数(Scalar Function)以及它们的组合表达式作计算。需要遵循[在线请求模式下单表简单查询的使用规范](#在线请求模式下单表简单查询的使用规范) |
| [`JOIN` 子句](../dql/JOIN_CLAUSE.md) | OpenMLDB目前仅支持**LAST JOIN**。需要遵循[在线请求模式下LAST JOIN的使用规范](#在线请求模式下-last-join-的使用规范) |
| [`WINDOW` 子句](../dql/WINDOW_CLAUSE.md) | 窗口子句用于定义一个或者若干个窗口。窗口可以是有名或者匿名的。用户可以在窗口上调用聚合函数进行分析计算。需要遵循[在线请求模式下Window的使用规范](#在线请求模式下window的使用规范) |

## 在线请求模式下 `SELECT` 子句的使用规范

### 在线请求模式下单表查询的使用规范
### 在线请求模式下单表简单查询的使用规范

- 仅支持列运算,表达式,以及单行处理函数(Scalar Function)以及它们的组合表达式运算。
- 单表查询不包含[GROUP BY子句](../dql/JOIN_CLAUSE.md)[WHERE子句](../dql/WHERE_CLAUSE.md)[HAVING子句](../dql/HAVING_CLAUSE.md)[WINDOW子句](../dql/WINDOW_CLAUSE.md)[LIMIT 子句](../dql/LIMIT_CLAUSE.md)
- 单表查询只涉及单张表的计算,不涉及[JOIN](../dql/JOIN_CLAUSE.md)多张表的计算
- 语法结构上只有两部分: `select list``FROM table`, 其他部分例如 [GROUP BY子句](../dql/JOIN_CLAUSE.md)[WHERE子句](../dql/WHERE_CLAUSE.md)[HAVING子句](../dql/HAVING_CLAUSE.md)[WINDOW子句](../dql/WINDOW_CLAUSE.md)[LIMIT 子句](../dql/LIMIT_CLAUSE.md) 都为空.
- `select_list` 仅有列投影,单行处理函数(Scalar Function), 不能有聚合函数
- table` 代表一张实际表, 即只涉及单张表的计算,不涉及多张表的操作, 例如 [JOIN](../dql/JOIN_CLAUSE.md), UNION

**Example: 支持上线的简单SELECT查询语句范例**

Expand Down

0 comments on commit 26f80b8

Please sign in to comment.