lihaosky commented on code in PR #26474:
URL: https://github.com/apache/flink/pull/26474#discussion_r2066987345


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/JsonFunctionsITCase.java:
##########
@@ -821,12 +821,18 @@ private static List<TestSetSpec> jsonSpec() {
                                         json("[1, 2, 3]")),
                                 "JSON_OBJECT(KEY 'p1' VALUE JSON(f0), KEY 'p2' 
VALUE JSON(f1), KEY 'p3' VALUE JSON('[1, 2, 3]'))",
                                 
"{\"p1\":{\"key\":\"value\"},\"p2\":{\"key\":{\"value\":42}},\"p3\":[1,2,3]}",
-                                STRING().notNull()),
-
-                // Tests for JSON calls inside of JSON_ARRAY
-                TestSetSpec.forFunction(BuiltInFunctionDefinitions.JSON_ARRAY)
-                        .onFieldsWithData("{\"key\":\"value\"}", "{\"key\": 
{\"value\": 42}}")
-                        .andDataTypes(STRING(), STRING())
+                                STRING().notNull())
+                        .testSqlValidationError(
+                                "JSON_OBJECT(KEY JSON('{}') VALUE 'value' 
ABSENT ON NULL)",
+                                "The JSON() function is currently only 
supported inside a JSON_OBJECT() or JSON_ARRAY() function.")

Review Comment:
   `The JSON() function is currently only supported inside a JSON_OBJECT() or 
JSON_ARRAY() as values`? Is this more accurate?



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