This is an automated email from the ASF dual-hosted git repository.
lincoln pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new d538534f696 [hotfix][docs] Move PERCENTILE doc from arithmetic to
aggregate section
d538534f696 is described below
commit d538534f69618141883dbf75b9cb04dc586a7ac1
Author: dylanhz <[email protected]>
AuthorDate: Thu Mar 26 18:04:44 2026 +0800
[hotfix][docs] Move PERCENTILE doc from arithmetic to aggregate section
This closes #27832.
---
docs/data/sql_functions.yml | 44 +++++++++++++++++++++---------------------
docs/data/sql_functions_zh.yml | 44 +++++++++++++++++++++---------------------
2 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/docs/data/sql_functions.yml b/docs/data/sql_functions.yml
index 7d7bc0768e4..f8fadbf3294 100644
--- a/docs/data/sql_functions.yml
+++ b/docs/data/sql_functions.yml
@@ -251,28 +251,6 @@ arithmetic:
- sql: TRUNCATE(numeric1, integer2)
table: NUMERIC1.truncate(INTEGER2)
description: Returns a numeric of truncated to integer2 decimal places.
Returns NULL if numeric1 or integer2 is NULL. If integer2 is 0, the result has
no decimal point or fractional part. integer2 can be negative to cause integer2
digits left of the decimal point of the value to become zero. This function can
also pass in only one numeric1 parameter and not set integer2 to use. If
integer2 is not set, the function truncates as if integer2 were 0. E.g.
42.324.truncate(2) to 42.32. and [...]
- - sql: PERCENTILE(expr, percentage[, frequency])
- table: expr.percentile(percentage[, frequency])
- description: |
- Returns the percentile value of expr at the specified percentage using
continuous distribution.
-
- E.g., SELECT PERCENTILE(age, 0.25) FROM (VALUES (10), (20), (30), (40))
AS age or $('age').percentile(0.25) returns 17.5
-
- The percentage must be a literal numeric value between `[0.0, 1.0]` or
an array of such values.
- If a variable expression is passed to this function, the result will be
calculated using any one of them.
- frequency describes how many times expr should be counted, the default
value is 1.
-
- If no expr lies exactly at the desired percentile, the result is
calculated using linear interpolation of the two nearest exprs.
- If expr or frequency is `NULL`, or frequency is not positive, the input
row will be ignored.
-
- NOTE: It is recommended to use this function in a window scenario, as it
typically offers better performance.
- In a regular group aggregation scenario, users should be aware of the
performance overhead caused by a full sort triggered by each record.
-
- `value <NUMERIC>, percentage [<NUMERIC NOT NULL> | <ARRAY<NUMERIC NOT
NULL> NOT NULL>], frequency <INTEGER_NUMERIC>`
- `(INTEGER_NUMERIC: TINYINT, SMALLINT, INTEGER, BIGINT)`
- `(NUMERIC: INTEGER_NUMERIC, FLOAT, DOUBLE, DECIMAL)`
-
- Returns a `DOUBLE` if percentage is numeric, or an `ARRAY<DOUBLE>` if
percentage is an array. `NULL` if percentage is an empty array.
string:
- sql: string1 || string2
@@ -1567,6 +1545,28 @@ aggregate:
JSON_ARRAYAGG(product)
FROM orders
```
+ - sql: PERCENTILE(expr, percentage[, frequency])
+ table: expr.percentile(percentage[, frequency])
+ description: |
+ Returns the percentile value of expr at the specified percentage using
continuous distribution.
+
+ E.g., SELECT PERCENTILE(age, 0.25) FROM (VALUES (10), (20), (30), (40))
AS age or $('age').percentile(0.25) returns 17.5
+
+ The percentage must be a literal numeric value between `[0.0, 1.0]` or
an array of such values.
+ If a variable expression is passed to this function, the result will be
calculated using any one of them.
+ frequency describes how many times expr should be counted, the default
value is 1.
+
+ If no expr lies exactly at the desired percentile, the result is
calculated using linear interpolation of the two nearest exprs.
+ If expr or frequency is `NULL`, or frequency is not positive, the input
row will be ignored.
+
+ NOTE: It is recommended to use this function in a window scenario, as it
typically offers better performance.
+ In a regular group aggregation scenario, users should be aware of the
performance overhead caused by a full sort triggered by each record.
+
+ `value <NUMERIC>, percentage [<NUMERIC NOT NULL> | <ARRAY<NUMERIC NOT
NULL> NOT NULL>], frequency <INTEGER_NUMERIC>`
+ `(INTEGER_NUMERIC: TINYINT, SMALLINT, INTEGER, BIGINT)`
+ `(NUMERIC: INTEGER_NUMERIC, FLOAT, DOUBLE, DECIMAL)`
+
+ Returns a `DOUBLE` if percentage is numeric, or an `ARRAY<DOUBLE>` if
percentage is an array. `NULL` if percentage is an empty array.
bitmapagg:
- sql: BITMAP_AND_AGG(bitmap)
diff --git a/docs/data/sql_functions_zh.yml b/docs/data/sql_functions_zh.yml
index 539e78168e1..5fa92933cd4 100644
--- a/docs/data/sql_functions_zh.yml
+++ b/docs/data/sql_functions_zh.yml
@@ -313,28 +313,6 @@ arithmetic:
如果 integer2 为 0,则结果没有小数点或小数部分。integer2 可以为负数,使值的小数点左边的 integer2 位变为零。
此函数也可以只传入一个参数 numeric1 且不设置参数 integer2 来使用。如果未设置 integer2 则 integer2 默认为
0。
例如 42.324.truncate(2) 为 42.32,42.324.truncate() 为 42.0。
- - sql: PERCENTILE(expr, percentage[, frequency])
- table: expr.percentile(percentage[, frequency])
- description: |
- 返回 expr 的 percentage 百分位值。
-
- E.g., SELECT PERCENTILE(age, 0.25) FROM (VALUES (10), (20), (30), (40))
AS age or $('age').percentile(0.25) returns 17.5
-
- percentage 必须是一个在 `[0.0, 1.0]` 之间的字面数值,或者是一个该范围的数组。
- 如果传递了一个可变表达式给这个函数,结果将根据其中的任意一个值进行计算。
- frequency 描述了 expr 的统计次数,默认值为 1。
-
- 如果没有 expr 恰好位于指定的百分位上,则结果通过对两个最接近的 expr 进行线性插值来计算。
- 如果 expr 或 frequency 为 `NULL`,或者 frequency 不是正数,则将忽略该输入行。
-
- 注意: 建议在窗口场景中使用此函数,因为它通常能提供更好的性能。
- 在常规的分组聚合场景中,用户应注意每条记录引发的全面排序带来的性能开销。
-
- `value <NUMERIC>, percentage [<NUMERIC NOT NULL> | <ARRAY<NUMERIC NOT
NULL> NOT NULL>], frequency <INTEGER_NUMERIC>`
- `(INTEGER_NUMERIC: TINYINT, SMALLINT, INTEGER, BIGINT)`
- `(NUMERIC: INTEGER_NUMERIC, FLOAT, DOUBLE, DECIMAL)`
-
- 如果 percentage 是数字,返回类型为 `DOUBLE`;如果 percentage 是数组,返回类型为
`ARRAY<DOUBLE>`。 如果 percentage 是空数组,则返回 `NULL`。
string:
- sql: string1 || string2
@@ -1651,6 +1629,28 @@ aggregate:
JSON_ARRAYAGG(product)
FROM orders
```
+ - sql: PERCENTILE(expr, percentage[, frequency])
+ table: expr.percentile(percentage[, frequency])
+ description: |
+ 返回 expr 的 percentage 百分位值。
+
+ E.g., SELECT PERCENTILE(age, 0.25) FROM (VALUES (10), (20), (30), (40))
AS age or $('age').percentile(0.25) returns 17.5
+
+ percentage 必须是一个在 `[0.0, 1.0]` 之间的字面数值,或者是一个该范围的数组。
+ 如果传递了一个可变表达式给这个函数,结果将根据其中的任意一个值进行计算。
+ frequency 描述了 expr 的统计次数,默认值为 1。
+
+ 如果没有 expr 恰好位于指定的百分位上,则结果通过对两个最接近的 expr 进行线性插值来计算。
+ 如果 expr 或 frequency 为 `NULL`,或者 frequency 不是正数,则将忽略该输入行。
+
+ 注意: 建议在窗口场景中使用此函数,因为它通常能提供更好的性能。
+ 在常规的分组聚合场景中,用户应注意每条记录引发的全面排序带来的性能开销。
+
+ `value <NUMERIC>, percentage [<NUMERIC NOT NULL> | <ARRAY<NUMERIC NOT
NULL> NOT NULL>], frequency <INTEGER_NUMERIC>`
+ `(INTEGER_NUMERIC: TINYINT, SMALLINT, INTEGER, BIGINT)`
+ `(NUMERIC: INTEGER_NUMERIC, FLOAT, DOUBLE, DECIMAL)`
+
+ 如果 percentage 是数字,返回类型为 `DOUBLE`;如果 percentage 是数组,返回类型为
`ARRAY<DOUBLE>`。 如果 percentage 是空数组,则返回 `NULL`。
bitmapagg:
- sql: BITMAP_AND_AGG(bitmap)