dawidwys commented on code in PR #26199:
URL: https://github.com/apache/flink/pull/26199#discussion_r1967382597


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/JsonFunctionsITCase.java:
##########
@@ -782,14 +783,95 @@ private static List<TestSetSpec> jsonSpec() {
                         .testTableApiRuntimeError(
                                 jsonObject(JsonOnNull.NULL, "K", json("{")),
                                 TableRuntimeException.class,
+                                "Invalid JSON string in JSON(value) function: 
\"{\". Error: 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.io.JsonEOFException:
 Unexpected end-of-input: expected close marker for Object (start marker at 
[Source: (String)\"{\"; line: 1, column: 1])\n"

Review Comment:
   Is the entire string necessary? Could we test for `Invalid JSON string in 
JSON(value) function` only? The rest of the message is rather fragile and can 
easily change.



##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/JsonGenerateUtils.scala:
##########
@@ -186,6 +185,18 @@ object JsonGenerateUtils {
     }
   }
 
+  /** Determines whether the given operand is a call to a JSON_OBJECT */

Review Comment:
   ```suggestion
     /** Determines whether the given operand is a call to a JSON_ARRAY */
   ```



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