Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle JSON-Null values in JSON functions #122

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

beckerhe
Copy link
Contributor

@beckerhe beckerhe commented Jul 5, 2023

This fixes a small issues with null-values in JSON. JSON functions like JSON_VALUE or JSON_QUERY have been panicking so far when they encountered a JSON null value as its input.

Example:
SELECT JSON_VALUE(JSON 'null') has been panicking and is now correctly returning NULL/nil.

I also adjusted the tests and hope I didn't miss anything.

Fixes: #121

This fixes a small issues with null-values in JSON. JSON functions like
JSON_VALUE or JSON_QUERY have been panicking so far when they
encountered a JSON null value as its input.

Example:
`SELECT JSON_VALUE(JSON 'null')` has been panicking and is now correctly
returning `NULL`/`nil`.

I also adjusted the tests and hope I didn't miss anything.

Fixes: goccy#121
@beckerhe beckerhe marked this pull request as ready for review July 5, 2023 09:09
@goccy goccy merged commit 273f218 into goccy:main Dec 19, 2023
@goccy
Copy link
Owner

goccy commented Dec 19, 2023

Thank you for your great PR !! LGTM 👍

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.

JSON_VALUE panics on "null" JSON values
2 participants