Airblader commented on a change in pull request #17508:
URL: https://github.com/apache/flink/pull/17508#discussion_r735869757



##########
File path: docs/data/sql_functions_zh.yml
##########
@@ -887,15 +875,11 @@ json:
   - sql: JSON_ARRAY([value]* [ { NULL | ABSENT } ON NULL ])
     table: jsonArray(JsonOnNull, values...)
     description: |
-      Builds a JSON array string from a list of values.
+      将一个数值列表构建成一个 JSON 数组字符串。
 
-      This function returns a JSON string. The values can be arbitrary 
expressions. The `ON NULL`
-      behavior defines how to treat `NULL` values. If omitted, `ABSENT ON 
NULL` is assumed by
-      default.
+      这个函数返回一个 JSON 字符串,值可以是任意表达式。'ON NULL' 行为定义了如何处理 'NULL' 值。如果省略,则假定 
'ABSENT ON NULL' 为默认值。
 
-      Elements which are created from another JSON construction function call 
(`JSON_OBJECT`,
-      `JSON_ARRAY`) are inserted directly rather than as a string. This allows 
building nested JSON
-      structures.
+      元素是由另一个 JSON 构造函数调用 ('JSON_OBJECT','JSON_ARRAY') 
直接插入所创建,而不是作为一个字符串。他允许构建嵌套的 JSON 结构。

Review comment:
       Yes, this is somewhat magic behavior of these functions, but all other 
RDBMS implement it this way as well, and it is significantly more useful to 
users than producing `'["[1]"]` – we discussed this at length. :-) We now also 
have `JSON_STRING`, so users could use `JSON_ARRAY(JSON_STRING(JSON_ARRAY(1)))` 
if they really wanted to.

##########
File path: docs/data/sql_functions_zh.yml
##########
@@ -887,15 +875,11 @@ json:
   - sql: JSON_ARRAY([value]* [ { NULL | ABSENT } ON NULL ])
     table: jsonArray(JsonOnNull, values...)
     description: |
-      Builds a JSON array string from a list of values.
+      将一个数值列表构建成一个 JSON 数组字符串。
 
-      This function returns a JSON string. The values can be arbitrary 
expressions. The `ON NULL`
-      behavior defines how to treat `NULL` values. If omitted, `ABSENT ON 
NULL` is assumed by
-      default.
+      这个函数返回一个 JSON 字符串,值可以是任意表达式。'ON NULL' 行为定义了如何处理 'NULL' 值。如果省略,则假定 
'ABSENT ON NULL' 为默认值。
 
-      Elements which are created from another JSON construction function call 
(`JSON_OBJECT`,
-      `JSON_ARRAY`) are inserted directly rather than as a string. This allows 
building nested JSON
-      structures.
+      元素是由另一个 JSON 构造函数调用 ('JSON_OBJECT','JSON_ARRAY') 
直接插入所创建,而不是作为一个字符串。他允许构建嵌套的 JSON 结构。

Review comment:
       Yes, this is somewhat magic behavior of these functions, but all other 
RDBMS implement it this way as well, and it is significantly more useful to 
users than producing `'["[1]"]'` – we discussed this at length. :-) We now also 
have `JSON_STRING`, so users could use `JSON_ARRAY(JSON_STRING(JSON_ARRAY(1)))` 
if they really wanted to.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to