diff --git a/docs/en/conf.py b/docs/en/conf.py index 51653bfcc0a..4bb6afeb1dd 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -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", diff --git a/docs/en/reference/sql/dql/GROUP_BY_CLAUSE.md b/docs/en/reference/sql/dql/GROUP_BY_CLAUSE.md index bdf81546f7c..341bd570e0d 100644 --- a/docs/en/reference/sql/dql/GROUP_BY_CLAUSE.md +++ b/docs/en/reference/sql/dql/GROUP_BY_CLAUSE.md @@ -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. diff --git a/docs/en/reference/sql/dql/HAVING_CLAUSE.md b/docs/en/reference/sql/dql/HAVING_CLAUSE.md index 4d9803d8eed..a109cf5d406 100644 --- a/docs/en/reference/sql/dql/HAVING_CLAUSE.md +++ b/docs/en/reference/sql/dql/HAVING_CLAUSE.md @@ -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 | diff --git a/docs/en/reference/sql/dql/JOIN_CLAUSE.md b/docs/en/reference/sql/dql/JOIN_CLAUSE.md index 51ab6be7d5f..8bb2c777ba9 100644 --- a/docs/en/reference/sql/dql/JOIN_CLAUSE.md +++ b/docs/en/reference/sql/dql/JOIN_CLAUSE.md @@ -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) | @@ -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)); diff --git a/docs/en/reference/sql/dql/LIMIT_CLAUSE.md b/docs/en/reference/sql/dql/LIMIT_CLAUSE.md index 360fb367a49..19d5315e829 100644 --- a/docs/en/reference/sql/dql/LIMIT_CLAUSE.md +++ b/docs/en/reference/sql/dql/LIMIT_CLAUSE.md @@ -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 | diff --git a/docs/en/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md b/docs/en/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md index 3f35d77cf5d..edcd5e9d654 100644 --- a/docs/en/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md +++ b/docs/en/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md @@ -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 diff --git a/docs/en/reference/sql/dql/SELECT_STATEMENT.md b/docs/en/reference/sql/dql/SELECT_STATEMENT.md index 95493a21352..d8398da6275 100644 --- a/docs/en/reference/sql/dql/SELECT_STATEMENT.md +++ b/docs/en/reference/sql/dql/SELECT_STATEMENT.md @@ -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.
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. -``` \ No newline at end of file +``` diff --git a/docs/en/reference/sql/dql/WINDOW_CLAUSE.md b/docs/en/reference/sql/dql/WINDOW_CLAUSE.md index 59f3368508b..b264f59b07b 100644 --- a/docs/en/reference/sql/dql/WINDOW_CLAUSE.md +++ b/docs/en/reference/sql/dql/WINDOW_CLAUSE.md @@ -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 diff --git a/docs/zh/conf.py b/docs/zh/conf.py index cd7a5dd6032..a9ba928439c 100644 --- a/docs/zh/conf.py +++ b/docs/zh/conf.py @@ -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", @@ -53,7 +58,6 @@ "tasklist", ] -myst_heading_anchors = 3 # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/zh/reference/sql/ddl/SHOW_COMPONENTS.md b/docs/zh/reference/sql/ddl/SHOW_COMPONENTS.md index 03b7937d9d9..6d19c1111f5 100644 --- a/docs/zh/reference/sql/ddl/SHOW_COMPONENTS.md +++ b/docs/zh/reference/sql/ddl/SHOW_COMPONENTS.md @@ -5,7 +5,9 @@ SHOW COMPONENTS; ``` -| Column | Description | +## 输出信息说明 + +| Column | Note | | ------------ |-------------------------------------------------------------------------| | Endpoint | 组件端点,同 `--endpoint` flag | | Role | 组件角色,有 `tablet`、`nameserver`、`taskmanager`、`apiserver`, 同 `--role` flag | @@ -20,7 +22,8 @@ SHOW COMPONENTS; - 只能展示单个 task manager master 的信息,不能展示其他 slave 节点 - 单机版 nameserver 的 connect time 不准确 ``` -# Example + +## Example ```sql SHOW COMPONENTS; diff --git a/docs/zh/reference/sql/ddl/SHOW_TABLE_STATUS.md b/docs/zh/reference/sql/ddl/SHOW_TABLE_STATUS.md index 06527d928e6..7291bbca959 100644 --- a/docs/zh/reference/sql/ddl/SHOW_TABLE_STATUS.md +++ b/docs/zh/reference/sql/ddl/SHOW_TABLE_STATUS.md @@ -8,27 +8,27 @@ SHOW TABLE STATUS -Column Information - -| Column | Description | -| ----------------- | ---------------------------------------------------------- | -| Table_id | 表唯一 id | -| Table_name | 表名 | -| Database_name | 数据库名 | -| Storage_type | 存储类型, `memory`,`ssd`,`hdd` | -| Rows | 表的 rows count | -| Memory_data_size | 表内存占用(单位 bytes) | -| Disk_data_size | 表磁盘占用 (但我 bytes) | -| Partition | Partiton 数量 | -| Partition_unalive | Unalive partition 数量 | -| Replica | Replica 数量 | -| Offline_path | 表对应 offline 数据路径, `NULL` if not exists | -| Offline_format | 表对应 offline 数据格式, `NULL` if not exists | +## 输出信息说明 + +| Column | Note | +| ----------------- |---------------------------------------------------| +| Table_id | 表唯一 id | +| Table_name | 表名 | +| Database_name | 数据库名 | +| Storage_type | 存储类型, `memory`,`ssd`,`hdd` | +| Rows | 表的行数 | +| Memory_data_size | 表内存占用(单位 bytes) | +| Disk_data_size | 表磁盘占用 (单位 bytes) | +| Partition | Partiton 数量 | +| Partition_unalive | Unalive partition 数量 | +| Replica | Replica 数量 | +| Offline_path | 表对应 offline 数据路径, `NULL` if not exists | +| Offline_format | 表对应 offline 数据格式, `NULL` if not exists | | Offline_deep_copy | 表对应 offline 数据是否使用 deep copy, `NULL` if not exits | -# Example +## Example ```sql > USE db; diff --git a/docs/zh/reference/sql/dql/JOIN_CLAUSE.md b/docs/zh/reference/sql/dql/JOIN_CLAUSE.md index ec15e6b1cd6..290fd8eeeb8 100644 --- a/docs/zh/reference/sql/dql/JOIN_CLAUSE.md +++ b/docs/zh/reference/sql/dql/JOIN_CLAUSE.md @@ -26,7 +26,7 @@ SELECT ... FROM table_ref LAST JOIN table_ref ON expression; | SELECT语句元素 | 离线模式 | 在线预览模式 | 在线请求模式 | 说明 | | :--------------------------------------------- | --------- | ------------ | ------------ |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| JOIN Clause| **``✓``** | **``✓``** | **``✓``** | 表示数据来源多个表JOIN。OpenMLDB目前仅支持LAST JOIN。在线请求模式下,需要遵循[在线请求模式下LAST JOIN的使用规范](https://openmldb.ai/docs/zh/main/reference/sql/deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servinglast-join) | +| JOIN Clause| **``✓``** | **``✓``** | **``✓``** | 表示数据来源多个表JOIN。OpenMLDB目前仅支持LAST JOIN。在线请求模式下,需要遵循[在线请求模式下LAST JOIN的使用规范](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servinglast-join) | ### 未排序的LAST JOIN @@ -43,7 +43,7 @@ SELECT ... FROM table_ref LAST JOIN table_ref ON expression; ![Figure 8: last join without order result](../dql/images/last_join_without_order2.png) ```{note} -为了实现上图展示的拼接效果,即使您使用的是离线模式,也请遵循[在线请求模式下LAST JOIN的使用规范](https://openmldb.ai/docs/zh/main/reference/sql/deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servinglast-join),如下文的SQL样例所示。 +为了实现上图展示的拼接效果,即使您使用的是离线模式,也请遵循[在线请求模式下LAST JOIN的使用规范](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servinglast-join),如下文的SQL样例所示。 否则由于底层存储顺序的不确定,尽管执行结果也是正确的,却可能无法复现上述拼接结果。 ``` diff --git a/docs/zh/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md b/docs/zh/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md index fd04675a95e..0cf3846eab4 100644 --- a/docs/zh/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md +++ b/docs/zh/reference/sql/dql/NO_TABLE_SELECT_CLAUSE.md @@ -20,7 +20,7 @@ SelectExpr ::= ( Identifier '.' ( Identifier '.' )? )? '*' SELECT const_expr [, const_expr ...]; ``` -## 2. SELECT语句元素 +## 边界说明 | SELECT语句元素 | 离线模式 | 在线预览模式 | 在线请求模式 | 说明 | | :--------------------------------------------- | --------- | ------------ | ------------ |:-------------------------------------| diff --git a/docs/zh/reference/sql/dql/SELECT_STATEMENT.md b/docs/zh/reference/sql/dql/SELECT_STATEMENT.md index 7d355241384..a1e8f4715f0 100644 --- a/docs/zh/reference/sql/dql/SELECT_STATEMENT.md +++ b/docs/zh/reference/sql/dql/SELECT_STATEMENT.md @@ -113,12 +113,12 @@ TableAsName | SELECT语句元素 | 离线模式 | 在线预览模式 | 在线请求模式 | 说明 | |:-----------------------------------------------| --------- | ------------ | ------------ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`SELECT` Clause](#selectexprlist) | **``✓``** | **``✓``** | **``✓``** | 投影操作列表,一般包括列名、表达式,或者是用 `*` 表示全部列 | -| [`FROM` Clause](#tablerefs) | **``✓``** | **``✓``** | **``✓``** | 表示数据来源,数据来源可以是一个表(`select * from t;`)或者是多个表 LAST JOIN (见[JOIN 子句](../dql/JOIN_CLAUSE.md)) 或者是0个表 ( `select 1+1;`),详见[NO_TABLE SELECT](../dql/NO_TABLE_SELECT_CLAUSE.md) | -| [`JOIN` Clause](../dql/JOIN_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | 表示数据来源多个表JOIN。OpenMLDB目前仅支持LAST JOIN。在线请求模式下,需要遵循[Online Request下LAST JOIN的使用规范](https://openmldb.ai/docs/zh/main/reference/sql/deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servinglast-join) | +| [`FROM` Clause](#tablerefs) | **``✓``** | **``✓``** | **``✓``** | 表示数据来源,数据来源可以是一个表(`select * from t;`)或者是多个表 LAST JOIN (见[JOIN 子句](../dql/JOIN_CLAUSE.md)) 或者是0个表 ( `select 1+1;`),详见[NO_TABLE SELECT](../dql/NO_TABLE_SELECT_CLAUSE.md) | +| [`JOIN` Clause](../dql/JOIN_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | 表示数据来源多个表JOIN。OpenMLDB目前仅支持LAST JOIN。在线请求模式下,需要遵循[Online Request下LAST JOIN的使用规范](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servinglast-join) | | [`WHERE` Clause](../dql/WHERE_CLAUSE.md) | **``✓``** | **``✓``** | | Where 子句用于设置过滤条件,查询结果中只会包含满足条件的数据。 | | [`GROUP BY` Clause](../dql/GROUP_BY_CLAUSE.md) | **``✓``** | | | Group By 子句用于对查询结果集进行分组。分组表达式列表仅支持简单列。 | | [`HAVING` Clause](../dql/HAVING_CLAUSE.md) | **``✓``** | | | Having 子句与 Where 子句作用类似.Having 子句过滤 GroupBy 后的各种数据,Where 子句在聚合前进行过滤。 | -| [`WINDOW` Clause](../dql/WINDOW_CLAUSE.md) | **``✓``** | | **``✓``** | 窗口子句用于定义一个或者若干个窗口。窗口可以是有名或者匿名的。用户可以在窗口上调用聚合函数来进行一些分析型计算的操作(```sql agg_func() over window_name```)。线请求模式下,需要遵循[Online Request下Window的使用规范](https://openmldb.ai/docs/zh/main/reference/sql/deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servingwindow) | +| [`WINDOW` Clause](../dql/WINDOW_CLAUSE.md) | **``✓``** | | **``✓``** | 窗口子句用于定义一个或者若干个窗口。窗口可以是有名或者匿名的。用户可以在窗口上调用聚合函数来进行一些分析型计算的操作(```sql agg_func() over window_name```)。线请求模式下,需要遵循[Online Request下Window的使用规范](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servingwindow) | | [`LIMIT` Clause](../dql/LIMIT_CLAUSE.md) | **``✓``** | **``✓``** | **``✓``** | Limit子句用于限制返回的结果条数。目前Limit仅支持接受一个参数,表示返回数据的最大行数。 | | `ORDER BY` Clause | | | | 标准SQL还支持Order By子句。OpenMLDB目前尚未支持Order子句。例如,查询语句`SELECT * from t1 ORDER BY col1;`在OpenMLDB中不被支持。 | diff --git a/docs/zh/reference/sql/dql/WINDOW_CLAUSE.md b/docs/zh/reference/sql/dql/WINDOW_CLAUSE.md index 7e733895ca3..bb42055ec1f 100644 --- a/docs/zh/reference/sql/dql/WINDOW_CLAUSE.md +++ b/docs/zh/reference/sql/dql/WINDOW_CLAUSE.md @@ -88,7 +88,7 @@ SELECT select_expr [,select_expr...], window_function_name(expr) OVER window_nam | SELECT语句元素 | 离线模式 | 在线预览模式 | 在线请求模式 | 说明 | |:----------------| --------- | ------------ | ------------ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| WINDOW Clause | **``✓``** | | **``✓``** | 窗口子句用于定义一个或者若干个窗口。窗口可以是有名或者匿名的。用户可以在窗口上调用聚合函数来进行一些分析型计算的操作(```sql agg_func() over window_name```)。在线请求模式下,需要遵循[Online Request下Window的使用规范](https://openmldb.ai/docs/zh/main/reference/sql/deployment_manage/ONLINE_SERVING_REQUIREMENTS.html#online-servingwindow) | +| WINDOW Clause | **``✓``** | | **``✓``** | 窗口子句用于定义一个或者若干个窗口。窗口可以是有名或者匿名的。用户可以在窗口上调用聚合函数来进行一些分析型计算的操作(```sql agg_func() over window_name```)。在线请求模式下,需要遵循[Online Request下Window的使用规范](../deployment_manage/ONLINE_SERVING_REQUIREMENTS.md#online-servingwindow) | ## 基本的WINDOW SPEC语法元素