davidradl commented on code in PR #26740:
URL: https://github.com/apache/flink/pull/26740#discussion_r2180036351
##########
docs/data/sql_functions.yml:
##########
@@ -1148,6 +1148,24 @@ json:
JSON_ARRAY(JSON('{"nested_json": {"value": 42}}'))
```
+variant:
+ - sql: PARSE_JSON(json_string[, allow_duplicate_keys])
+ description: |
+ Parse a JSON string into a Variant. If the JSON string is invalid, an
error will be thrown.
+ To return NULL instead of an error, use the `TRY_PARSE_JSON` function.
+
+ If `allowDuplicateKeys` is set to false, parsing variant from JSON will
throw an error if
Review Comment:
nit: suggest text change
If there are duplicate keys in the input JSON string, when
`allowDuplicateKeys` is true, the parser will keep the
last occurrence of all fields with the same key, otherwise when
`allowDuplicateKeys` is false it will throw an error.
I suggest saying what the default for `allowDuplicateKeys` is.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]