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


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala:
##########
@@ -604,6 +604,20 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "foothebar")
   }
 
+  @Test
+  def testJsonQuote(): Unit = {
+    testSqlApi("JSON_QUOTE('null')", "\"null\"")
+    testSqlApi("JSON_QUOTE('\"null\"')", "\"\\\"null\\\"\"")
+    testSqlApi("JSON_QUOTE('[1, 2, 3]')", "\"[1, 2, 3]\"")

Review Comment:
   We can do it. My main intuition was that to escape characters that are 
reserved in JSON: 
   https://www.freeformatter.com/json-escape.html



-- 
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