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

add nil check in json_unquote function as LongText.Convert() can retu… #511

Closed
wants to merge 1 commit into from

Conversation

iluminae
Copy link

…rn nil,nil

This fixes an issue that can trigger a panic in master with:

SELECT json_unquote(json_extract('{"hi":"there"}', '$.nope'))

When json_extract returns with a path that is not resolved in the result, json_unquote will blow up while producing an error.

@zachmu
Copy link
Member

zachmu commented Jul 29, 2021

Thanks for the contribution!

Can you add an engine test that fails before your fix and passes after? Probably should go in queries.go, in the enginetest package.

@zachmu
Copy link
Member

zachmu commented Oct 28, 2021

hi @iluminae,

I'm going to close this out due to inactivity. Please feel free to resubmit if you can add the engine test as asked, we would be happy to get the contribution.

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.

2 participants