This is an automated email from the ASF dual-hosted git repository.

snuyanzin 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 754254f3fed [FLINK-39343][doc] Fix inconsistencies in 
`sql_functions.yml` documentation
754254f3fed is described below

commit 754254f3fedd3e5409fab01fe7056a4c17ca829f
Author: Ramin Gharib <[email protected]>
AuthorDate: Fri Mar 27 22:25:19 2026 +0100

    [FLINK-39343][doc] Fix inconsistencies in `sql_functions.yml` documentation
---
 docs/data/sql_functions.yml    | 31 ++++++++++++++++---------------
 docs/data/sql_functions_zh.yml | 21 +++++++++++----------
 2 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/docs/data/sql_functions.yml b/docs/data/sql_functions.yml
index f8fadbf3294..0ee07f21c57 100644
--- a/docs/data/sql_functions.yml
+++ b/docs/data/sql_functions.yml
@@ -59,7 +59,7 @@ comparison:
   - sql: string1 NOT SIMILAR TO string2 [ ESCAPE char ]
     description: Returns TRUE if string1 does not match SQL regular expression 
string2; returns UNKNOWN if string1 or string2 is NULL. An escape character can 
be defined if necessary. The escape character has not been supported yet.
   - sql: value1 IN (value2 [, value3]* )
-    table: value1.in(valu2)
+    table: value1.in(value2)
     description: Returns TRUE if value1 exists in the given list (value2, 
value3, ...). When (value2, value3, ...). contains NULL, returns TRUE if the 
element can be found and UNKNOWN otherwise. Always returns UNKNOWN if value1 is 
NULL. E.g., 4 IN (1, 2, 3) returns FALSE; 1 IN (1, 2, NULL) returns TRUE; 4 IN 
(1, 2, NULL) returns UNKNOWN.
   - sql: value1 NOT IN (value2 [, value3]* )
     description: Returns TRUE if value1 does not exist in the given list 
(value2, value3, ...). When (value2, value3, ...). contains NULL, returns FALSE 
if value1 can be found and UNKNOWN otherwise. Always returns UNKNOWN if value1 
is NULL. E.g., 4 NOT IN (1, 2, 3) returns TRUE; 1 NOT IN (1, 2, NULL) returns 
FALSE; 4 NOT IN (1, 2, NULL) returns UNKNOWN.
@@ -115,7 +115,7 @@ arithmetic:
   - sql: numeric1 - numeric2
     table: NUMERIC1 - NUMERIC2
     description: Return NUMERIC1 minus NUMERIC2
-  - sql: numeric1 * numberic2
+  - sql: numeric1 * numeric2
     table: NUMERIC1 * NUMERIC2
     description: Returns NUMERIC1 multiplied by NUMERIC2
   - sql: numeric1 / numeric2
@@ -126,7 +126,7 @@ arithmetic:
     description: Returns the remainder (modulus) of numeric1 divided by 
numeric2. The result is negative only if numeric1 is negative.
   - sql: POWER(numeric1, numeric2)
     table: NUMERIC1.power(NUMERIC2)
-    description: NUMERIC1.power(NUMERIC2)
+    description: Returns NUMERIC1 raised to the power of NUMERIC2.
   - sql: ABS(numeric)
     table: numeric.abs()
     description: Returns the absolute value of numeric.
@@ -224,7 +224,7 @@ arithmetic:
     description: Returns a pseudorandom integer value in the range [0, INT)
   - sql: RAND_INTEGER(INT1, INT2)
     table: randInteger(INT1, INT2)
-    description: Returns a pseudorandom integer value in the range [0, INT2) 
with an initial seed INT1. Two RAND_INTGER functions will return idential 
sequences of numbers if they have the same initial seed and bound.
+    description: Returns a pseudorandom integer value in the range [0, INT2) 
with an initial seed INT1. Two RAND_INTEGER functions will return identical 
sequences of numbers if they have the same initial seed and bound.
   - sql: UUID()
     table: uuid()
     description: Returns an UUID (Universally Unique Identifier) string (e.g., 
"3d3c68f7-f608-473f-b60c-b0c44ad4cc4e") according to RFC 4122 type 4 (pseudo 
randomly generated) UUID. The UUID is generated using a cryptographically 
strong pseudo random number generator.
@@ -277,7 +277,7 @@ string:
       
       The function exploits the java.util.Formatter class with Locale.US.
       
-      null obj is formated as a string "null".
+      null obj is formatted as a string "null".
       
       format <CHAR | VARCHAR>, obj <ANY>
       
@@ -409,26 +409,26 @@ string:
       
       `str <CHAR | VARCHAR>, regex <CHAR | VARCHAR>`
       
-      Returns an `STRING` representation of the first matched substring. 
`NULL` if any of the arguments are `NULL` or regex if invalid or pattern is not 
found.
+      Returns an `STRING` representation of the first matched substring. 
`NULL` if any of the arguments are `NULL` or regex is invalid or pattern is not 
found.
   - sql: TRANSLATE(expr, fromStr, toStr)
     table: expr.translate(fromStr, toStr)
     description: |
       Translate an expr where all characters in fromStr have been replaced 
with those in toStr. If toStr has a shorter length than fromStr, unmatched 
characters are removed.
 
-      E.g., SELECT TRANSLATE3('www.apache.org', 'wapcheorg', ' APCHEcom') or 
'www.apache.org'.translate('wapcheorg', ' APCHEcom') returns "   .APACHE.com".
+      E.g., SELECT TRANSLATE('www.apache.org', 'wapcheorg', ' APCHEcom') or 
'www.apache.org'.translate('wapcheorg', ' APCHEcom') returns "   .APACHE.com".
       
       `expr <CHAR | VARCHAR>, fromStr <CHAR | VARCHAR>, toStr <CHAR | VARCHAR>`
 
       Returns a `STRING` of translated expr.
   - sql: INITCAP(string)
     table: STRING.initCap()
-    description: Returns a new form of STRING with the first character of each 
word converted to uppercase and the rest characters to lowercase. Here a word 
means a sequences of alphanumeric characters.
+    description: Returns a new form of STRING with the first character of each 
word converted to uppercase and the rest characters to lowercase. Here a word 
means a sequence of alphanumeric characters.
   - sql: CONCAT(string1, string2,...)
     table: concat(STRING1, STRING2, ...)
     description: Returns a string that concatenates string1, string2, .... 
Returns NULL if any argument is NULL. E.g., CONCAT('AA', 'BB', 'CC') returns 
"AABBCC".
   - sql: CONCAT_WS(string1, string2, string3,...)
     table: concat_ws(STRING1, STRING2, STRING3, ...)
-    description: Returns a string that concatenates STRING2, STRING3, ... with 
a separator STRING1. The separator is added between the strings to be 
concatenated. Returns NULL If STRING1 is NULL. Compared with concat(), 
concat_ws() automatically skips NULL arguments. E.g., concat_ws('~', 'AA', 
Null(STRING), 'BB', '', 'CC') returns "AA~BB~~CC".
+    description: Returns a string that concatenates STRING2, STRING3, ... with 
a separator STRING1. The separator is added between the strings to be 
concatenated. Returns NULL if STRING1 is NULL. Compared with concat(), 
concat_ws() automatically skips NULL arguments. E.g., concat_ws('~', 'AA', 
Null(STRING), 'BB', '', 'CC') returns "AA~BB~~CC".
   - sql: LPAD(string1, integer, string2)
     table: STRING1.lpad(INT, STRING2)
     description: Returns a new string from string1 left-padded with string2 to 
a length of integer characters. If the length of string1 is shorter than 
integer, returns string1 shortened to integer characters. E.g., LPAD('hi', 4, 
'??') returns "??hi"; LPAD('hi', 1, '??') returns "h".
@@ -610,7 +610,7 @@ temporal:
     description: Returns the current SQL timestamp in the local time zone, 
this is a synonym of CURRENT_TIMESTAMP.
   - sql: CURRENT_ROW_TIMESTAMP()
     description: Returns the current SQL timestamp in the local time zone, the 
return type is TIMESTAMP_LTZ(3). It is evaluated for each record no matter in 
batch or streaming mode.
-  - sql: EXTRACT(timeinteravlunit FROM temporal)
+  - sql: EXTRACT(timeintervalunit FROM temporal)
     table: TEMPORAL.extract(TIMEINTERVALUNIT)
     description: Returns a long value extracted from the timeintervalunit part 
of temporal. E.g., EXTRACT(DAY FROM DATE '2006-06-05') returns 5.
   - sql: YEAR(date)
@@ -628,7 +628,7 @@ temporal:
   - sql: DAYOFWEEK(date)
     description: Returns the day of a week (an integer between 1 and 7) from 
SQL date. Equivalent to EXTRACT(DOW FROM date). E.g., DAYOFWEEK(DATE 
'1994-09-27') returns 3.
   - sql: HOUR(timestamp)
-    description: Returns the hour of a day (an integer between 0 and 23) from 
SQL timestamp timestamp. Equivalent to EXTRACT(HOUR FROM timestamp). E.g., 
MINUTE(TIMESTAMP '1994-09-27 13:14:15') returns 14.
+    description: Returns the hour of a day (an integer between 0 and 23) from 
SQL timestamp timestamp. Equivalent to EXTRACT(HOUR FROM timestamp). E.g., 
HOUR(TIMESTAMP '1994-09-27 13:14:15') returns 13.
   - sql: MINUTE(timestamp)
     description: Returns the minute of an hour (an integer between 0 and 59) 
from SQL timestamp timestamp. Equivalent to EXTRACT(MINUTE FROM timestamp). 
E.g., MINUTE(TIMESTAMP '1994-09-27 13:14:15') returns 14.
   - sql: SECOND(timestamp)
@@ -636,7 +636,7 @@ temporal:
   - sql: FLOOR(timepoint TO timeintervalunit)
     table: TIMEPOINT.floor(TIMEINTERVALUNIT)
     description: Returns a value that rounds timepoint down to the time unit 
timeintervalunit. E.g., FLOOR(TIME '12:44:31' TO MINUTE) returns 12:44:00.
-  - sql: CEIL(timepoint TO timeintervaluntit)
+  - sql: CEIL(timepoint TO timeintervalunit)
     table: TIMEPOINT.ceil(TIMEINTERVALUNIT)
     description: Returns a value that rounds timepoint up to the time unit 
timeintervalunit. E.g., CEIL(TIME '12:44:31' TO MINUTE) returns 12:45:00.
   - sql: (timepoint1, temporal1) OVERLAPS (timepoint2, temporal2)
@@ -646,9 +646,10 @@ temporal:
     table: dateFormat(TIMESTAMP, STRING)
     description: Converts timestamp to a value of string in the format 
specified by the date format string. The format string is compatible with 
Java's SimpleDateFormat.
   - sql: TIMESTAMPADD(timeintervalunit, interval, timepoint)
+    description: Returns the timestamp with the interval added. The unit for 
the interval is given by the first argument, which should be one of the 
following values. SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR. 
E.g., TIMESTAMPADD(WEEK, 1, TIMESTAMP '2020-01-01 00:00:00') returns TIMESTAMP 
'2020-01-08 00:00:00'; TIMESTAMPADD(QUARTER, 1, TIMESTAMP '2020-01-01 
00:00:00') returns TIMESTAMP '2020-04-01 00:00:00'.
   - sql: TIMESTAMPDIFF(timepointunit, timepoint1, timepoint2)
     table: timestampDiff(TIMEPOINTUNIT, TIMEPOINT1, TIMEPOINT2)
-    description: 'Returns the (signed) number of timepointunit between 
timepoint1 and timepoint2. The unit for the interval is given by the first 
argument, which should be one of the following values: SECOND, MINUTE, HOUR, 
DAY, MONTH, or YEAR.'
+    description: 'Returns the (signed) number of timepointunit between 
timepoint1 and timepoint2. The unit for the interval is given by the first 
argument, which should be one of the following values: SECOND, MINUTE, HOUR, 
DAY, WEEK, MONTH, QUARTER, or YEAR.'
   - sql: CONVERT_TZ(string1, string2, string3)
     table: convertTz(STRING1, STRING2, STRING3)
     description: Converts a datetime string1 (with default ISO timestamp 
format 'yyyy-MM-dd HH:mm:ss') from time zone string2 to time zone string3. The 
format of time zone should be either an abbreviation such as "PST", a full name 
such as "America/Los_Angeles", or a custom ID such as "GMT-08:00". E.g., 
CONVERT_TZ('1970-01-01 00:00:00', 'UTC', 'America/Los_Angeles') returns 
'1969-12-31 16:00:00'.
@@ -1419,7 +1420,7 @@ bitmap:
       
       Returns a `BITMAP`. `NULL` if any of the arguments are `NULL`.
 
-auxilary:
+auxiliary:
   - table: callSql(STRING)
     description: |
       A call to a SQL expression.
@@ -1496,7 +1497,7 @@ aggregate:
   - sql: CUME_DIST()
     description: Return the cumulative distribution of a value in a group of 
values. The result is the number of rows preceding or equal to the current row 
in the ordering of the partition divided by the number of rows in the window 
partition.
   - sql: PERCENT_RANK()
-    description: Return the percentage ranking of a value in a group of 
values. The result is the rank value minus one, divided by the number of rows 
in the parition minus one. If the partition only contains one row, the function 
will return 0.
+    description: Return the percentage ranking of a value in a group of 
values. The result is the rank value minus one, divided by the number of rows 
in the partition minus one. If the partition only contains one row, the 
function will return 0.
   - sql: NTILE(n)
     description: |
       Divides the rows for each window partition into `n` buckets ranging from 
1 to at most `n`.
diff --git a/docs/data/sql_functions_zh.yml b/docs/data/sql_functions_zh.yml
index 5fa92933cd4..dfd35ad0e3d 100644
--- a/docs/data/sql_functions_zh.yml
+++ b/docs/data/sql_functions_zh.yml
@@ -161,7 +161,7 @@ arithmetic:
   - sql: numeric1 - numeric2
     table: NUMERIC1 - NUMERIC2
     description: 返回 numeric1 减 numeric2。
-  - sql: numeric1 * numberic2
+  - sql: numeric1 * numeric2
     table: NUMERIC1 * NUMERIC2
     description: 返回 numeric1 乘以 numeric2。
   - sql: numeric1 / numeric2
@@ -276,7 +276,7 @@ arithmetic:
     table: randInteger(INT1, INT2)
     description: |
       返回范围为 [0, INT2) 的伪随机整数,初始种子为 INT1。
-      如果两个 RAND_INTGER 函数具有相同的初始种子和边界,它们将返回相同的数字序列。
+      如果两个 RAND_INTEGER 函数具有相同的初始种子和边界,它们将返回相同的数字序列。
   - sql: UUID()
     table: uuid()
     description: |
@@ -482,7 +482,7 @@ string:
     description: |
       将 expr 中所有出现在 fromStr 之中的字符替换为 toStr 中的相应字符。如果 toStr 的长度短于 
fromStr,则未匹配的字符将被移除。
 
-      E.g., SELECT TRANSLATE3('www.apache.org', 'wapcheorg', ' APCHEcom') or 
'www.apache.org'.translate('wapcheorg', ' APCHEcom') returns "   .APACHE.com".
+      E.g., SELECT TRANSLATE('www.apache.org', 'wapcheorg', ' APCHEcom') or 
'www.apache.org'.translate('wapcheorg', ' APCHEcom') returns "   .APACHE.com".
       
       `expr <CHAR | VARCHAR>, fromStr <CHAR | VARCHAR>, toStr <CHAR | VARCHAR>`
 
@@ -698,9 +698,9 @@ temporal:
   - sql: CURRENT_ROW_TIMESTAMP()
     description: |
       返回本地时区的当前 SQL 时间戳,返回类型为 TIMESTAMP_LTZ(3)。无论是在批处理模式还是流模式下,都会为每条记录进行取值。
-  - sql: EXTRACT(timeinteravlunit FROM temporal)
+  - sql: EXTRACT(timeintervalunit FROM temporal)
     table: TEMPORAL.extract(TIMEINTERVALUNIT)
-    description: 返回从时间 temporal 的时间间隔单位部分 timeinteravlunit 提取的 long 值。例如 
`EXTRACT(DAY FROM DATE '2006-06-05')` 返回 5。
+    description: 返回从时间 temporal 的时间间隔单位部分 timeintervalunit 提取的 long 值。例如 
`EXTRACT(DAY FROM DATE '2006-06-05')` 返回 5。
   - sql: YEAR(date)
     description: |
       从 SQL 日期 date 返回年份。相当于 EXTRACT(YEAR FROM date)。例如 `YEAR(DATE 
'1994-09-27')` 返回 1994。
@@ -731,7 +731,7 @@ temporal:
   - sql: HOUR(timestamp)
     description: |
       从 SQL 时间戳 timestamp 返回小时单位部分的小时(0 到 23 之间的整数)数。相当于 EXTRACT(HOUR FROM 
timestamp)。
-      例如 `MINUTE(TIMESTAMP '1994-09-27 13:14:15')` 返回 14。
+      例如 `HOUR(TIMESTAMP '1994-09-27 13:14:15')` 返回 13。
   - sql: MINUTE(timestamp)
     description: |
       从 SQL 时间戳 timestamp 返回分钟单位的分钟数(0 到 59 之间的整数)。相当于 EXTRACT(MINUTE FROM 
timestamp)。
@@ -745,10 +745,10 @@ temporal:
     description: |
       返回将时间点 timepoint 向下取值到时间单位 timeintervalunit 的值。例如 `FLOOR(TIME '12:44:31' 
TO MINUTE)`
       返回 12:44:00。
-  - sql: CEIL(timespoint TO timeintervaluntit)
+  - sql: CEIL(timepoint TO timeintervalunit)
     table: TIMEPOINT.ceil(TIMEINTERVALUNIT)
     description: |
-      返回将时间点 timespoint 向上取值到时间单位 timeintervaluntit 的值。例如 `CEIL(TIME 
'12:44:31' TO MINUTE)`
+      返回将时间点 timepoint 向上取值到时间单位 timeintervalunit 的值。例如 `CEIL(TIME '12:44:31' 
TO MINUTE)`
       返回 12:45:00。
   - sql: (timepoint1, temporal1) OVERLAPS (timepoint2, temporal2)
     table: temporalOverlaps(TIMEPOINT1, TEMPORAL1, TIMEPOINT2, TEMPORAL2)
@@ -762,11 +762,12 @@ temporal:
     description: |
       将时间戳 timestamp 转换为日期格式字符串 string 指定格式的字符串值。格式字符串与 Java 的 
SimpleDateFormat 兼容。
   - sql: TIMESTAMPADD(timeintervalunit, interval, timepoint)
+    description: Returns the timestamp with the interval added. The unit for 
the interval is given by the first argument, which should be one of the 
following values. SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR. 
E.g., TIMESTAMPADD(WEEK, 1, TIMESTAMP '2020-01-01 00:00:00') returns TIMESTAMP 
'2020-01-08 00:00:00'; TIMESTAMPADD(QUARTER, 1, TIMESTAMP '2020-01-01 
00:00:00') returns TIMESTAMP '2020-04-01 00:00:00'.
   - sql: TIMESTAMPDIFF(timepointunit, timepoint1, timepoint2)
     table: timestampDiff(TIMEPOINTUNIT, TIMEPOINT1, TIMEPOINT2)
     description: |
       返回 timepoint1 和 timepoint2 之间时间间隔。间隔的单位由第一个参数给出,它应该是以下值之一:
-      SECOND,MINUTE,HOUR,DAY,MONTH 或 YEAR。
+      SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,QUARTER 或 YEAR。
   - sql: CONVERT_TZ(string1, string2, string3)
     table: convertTz(STRING1, STRING2, STRING3)
     description: |
@@ -1505,7 +1506,7 @@ bitmap:
       
       返回一个 `BITMAP`。如果任一参数为 `NULL`,则返回 `NULL`。
 
-auxilary:
+auxiliary:
   - table: callSql(STRING)
     description: |
       对 SQL 表达式的调用。

Reply via email to