jeyhunkarimov commented on code in PR #24156:
URL: https://github.com/apache/flink/pull/24156#discussion_r1486149775


##########
docs/data/sql_functions.yml:
##########
@@ -377,6 +377,12 @@ string:
   - sql: SUBSTR(string, integer1[, integer2])
     table: STRING.substr(INTEGER1[, INTEGER2])
     description: Returns a substring of string starting from position integer1 
with length integer2 (to the end by default).
+  - sql: JSON_QUOTE(string)
+    table: STRING.JsonQuote()
+    description: Quotes a string as a JSON value by wrapping it with double 
quote characters, escaping interior quote and other characters, and returning 
the result as a utf8mb4 string. If the argument is NULL, the function returns 
NULL.
+  - sql: JSON_UNQUOTE(string)
+    table: STRING.JsonUnquote()
+    description: Unquotes JSON value and returns the result as a utf8mb4 
string. If the argument is NULL, returns NULL. If the value starts and ends 
with double quotes but is not a valid JSON string literal, the value is passed 
through unmodified.

Review Comment:
   Yes, I also had a similar question. From the definition, if the input is not 
a valid JSON string literal, then we pass the value as it is. For example, 
`"key"` is not a valid JSON literal but `["key"]` is. Maybe we need more 
investigation on this.



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to