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

refine window functions and aggregate functions description #9657

Merged
merged 5 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions functions-and-operators/aggregate-group-by-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ TiDB 支持的 MySQL `GROUP BY` 聚合函数如下所示:
1 row in set (0.00 sec)
```

上述聚合函数除 `GROUP_CONCAT()` 和 `APPROX_PERCENTILE()` 以外,均可作为[窗口函数](window-functions.md)使用。
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

## GROUP BY 修饰符

TiDB 目前不支持 `GROUP BY` 修饰符,例如 `WITH ROLLUP`,将来会提供支持。详情参阅 [#4250](https://github.com/pingcap/tidb/issues/4250)。
Expand Down
2 changes: 1 addition & 1 deletion functions-and-operators/window-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ aliases: ['/docs-cn/dev/functions-and-operators/window-functions/','/docs-cn/dev

TiDB 中窗口函数的使用方法与 MySQL 8.0 基本一致,详情可参见 [MySQL 窗口函数](https://dev.mysql.com/doc/refman/8.0/en/window-functions.html)。由于窗口函数会使用一些保留关键字,可能导致原先可以正常执行的 SQL 语句在升级 TiDB 后无法被解析语法,此时可以将 `tidb_enable_window_function` 设置为 `0`,该参数的默认值为 `1`。

TiDB 支持的窗口函数如下所示
TiDB 支持除 `GROUP_CONCAT()` 和 `APPROX_PERCENTILE()` 以外的所有 [`GROUP BY` 聚合函数](aggregate-group-by-functions.md)。此外,TiDB 支持的其他窗口函数如下
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

| 函数名 | 功能描述 |
| :-------------- | :------------------------------------- |
Expand Down