Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data/sql_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ variant:
- sql: TRY_PARSE_JSON(json_string[, allow_duplicate_keys])
table: STRING.tryParseJson([allowDuplicateKeys])
description: |
Try to parse a JSON string into a Variant if possible. If the JSON string is invalid, return
Try to parse a JSON string into a Variant if possible. If the JSON string is invalid, return
NULL. To throw an error instead of returning NULL, use the `PARSE_JSON` function.

If there are duplicate keys in the input JSON string, when `allowDuplicateKeys` is true, the
Expand Down
4 changes: 2 additions & 2 deletions flink-python/pyflink/table/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,8 +2303,8 @@ def try_parse_json(self, allow_duplicate_keys=None) -> 'Expression':
None is returned. To throw an error instead, use :func:`~Expression.parse_json`.

If there are duplicate keys in the input, allow_duplicate_keys controls whether the
parser keeps the last occurrence of each duplicated key (True) or throws an error
(False). The default value of allow_duplicate_keys is False.
parser keeps the last occurrence of each duplicated key (True) or returns
None (False). The default value of allow_duplicate_keys is False.
"""
if allow_duplicate_keys is None:
return _unary_op("tryParseJson")(self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1411,8 +1411,8 @@ public OutType tryParseJson() {
* #parseJson(boolean)}.
*
* <p>If there are duplicate keys in the input, {@code allowDuplicateKeys} controls whether the
* parser keeps the last occurrence of each duplicated key ({@code true}) or throws an error
* ({@code false}).
* parser keeps the last occurrence of each duplicated key ({@code true}) or returns {@code
* NULL} ({@code false}).
*/
public OutType tryParseJson(boolean allowDuplicateKeys) {
return toApiSpecificExpression(
Expand Down