You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/09/08 05:44:30 UTC

[GitHub] [flink] Airblader commented on a change in pull request #17186: [FLINK-16203][table] Support JSON_OBJECT()

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



##########
File path: docs/data/sql_functions.yml
##########
@@ -708,6 +708,41 @@ json:
       -- '[]'
       JSON_QUERY('{}', 'strict $.invalid' EMPTY ARRAY ON ERROR)
       ```
+  - sql: JSON_OBJECT([KEY key VALUE value]* [ { NULL | ABSENT } ON NULL ])
+    table: jsonObject(JsonOnNull, keyValues...)
+    description: |
+      Builds a JSON string from a list of key-value pairs.
+
+      Note that keys must be non-`NULL` string literals, while values may be arbitrary expressions.
+
+      The `ON NULL` behavior defines how to treat `NULL` values.
+
+      Note that this function only returns a JSON string, not an actual JSON type. Not all JSON can

Review comment:
       (Also, that's just how Calcite implements it, but this is the better reason to state)




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org