Skip to content

Issue apache#2362 Evaluate JsonPath functions in the JSON Input transform - #8198

Merged
hansva merged 4 commits into
apache:mainfrom
sramazzina:fix-2362-jsoninput-jsonpath-functions
Sep 25, 2026
Merged

hansva merged 4 commits into
apache:mainfrom
sramazzina:fix-2362-jsoninput-jsonpath-functions

Conversation

@sramazzina

@sramazzina sramazzina commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor
  • JsonPath refuses to evaluate a function path (length(), sum(), keys(), ...)
    while ALWAYS_RETURN_LIST is set and, with SUPPRESS_EXCEPTIONS, returns null
    instead; such a path is now re-evaluated without that option and its scalar
    result exposed as a single row.
  • The null returned in that case reached normalizeJsonPathResult and caused a
    NullPointerException while building the error message; the case is now
    handled before it gets there.
  • Document JsonPath functions in the JSON Input transform page, including the
    single-row constraint.

Fixes #2362


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@hansva

hansva commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Add some integration tests too please

@sramazzina

Copy link
Copy Markdown
Contributor Author

Oh yes I forget I'll do that sorry my bad

@sramazzina
sramazzina marked this pull request as draft September 1, 2026 13:04
@hansva
hansva force-pushed the fix-2362-jsoninput-jsonpath-functions branch from dd7a67f to 9eb5ce5 Compare September 25, 2026 09:15
@hansva
hansva marked this pull request as ready for review September 25, 2026 09:15
@hansva
hansva merged commit bf7518d into apache:main Sep 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: JSON input - transform cannot retrieve number of elements in an array

2 participants