Skip to content

[hotfix][table] Fix tryParseJson() docs to say NULL instead of throws an error - #29124

Merged
twalthr merged 1 commit into
apache:masterfrom
raminqaf:FLINK-40545-doc-fixes
Sep 7, 2026
Merged

[hotfix][table] Fix tryParseJson() docs to say NULL instead of throws an error#29124
twalthr merged 1 commit into
apache:masterfrom
raminqaf:FLINK-40545-doc-fixes

Conversation

@raminqaf

@raminqaf raminqaf commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Fixes incorrect documentation for tryParseJson(allowDuplicateKeys) introduced in FLINK-40545 (bf4a71a). The Javadoc, Python docstring, and sql_functions.yml entry were copy-pasted from parseJson() and wrongly claimed the false branch "throws an error." Since TRY_PARSE_JSON catches all parse errors and returns NULL, the docs now match that contract.

Brief change log

  • BaseExpressions.java: fix Javadoc for tryParseJson(boolean)
  • expression.py: fix docstring for try_parse_json
  • sql_functions.yml: fix description text, trim a trailing-whitespace line

Verifying this change

Docs-only change, no test coverage needed.

Does this pull request potentially affect one of the following parts:

  • Dependencies: no
  • The public API: no (Javadoc/docstring only)
  • The serializers: no
  • The runtime per-record code paths: no
  • Deployment/recovery: no
  • S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Tool Name and Version]

… an error

FLINK-40545 copy-pasted the parseJson() wording into tryParseJson(), so the allowDuplicateKeys=false branch claimed the TRY variant throws an error.
TRY_PARSE_JSON catches all parse errors, including duplicate-key errors, and returns NULL instead of throwing, so the Java Javadoc, Python docstring, and sql_functions.yml description are corrected to match.
Also trims a trailing-whitespace line in sql_functions.yml picked up in the same block.
@flinkbot

flinkbot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@twalthr
twalthr merged commit 39bf636 into apache:master Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants